mirror of
https://github.com/Ellpeck/ObsidianJustSharePlease.git
synced 2024-11-26 20:28:34 +01:00
parent
833d0b182a
commit
579b5b17b5
3 changed files with 18 additions and 9 deletions
|
@ -230,6 +230,9 @@ export default class JustSharePleasePlugin extends Plugin {
|
|||
if (this.settings.stripFrontmatter)
|
||||
text = text.replace(/^---\s*\n.*?\n---\s*\n(.*)$/s, "$1");
|
||||
|
||||
// strip comments
|
||||
text = text.replace(/%%.*?%%/sg, "");
|
||||
|
||||
// include note name
|
||||
if (this.settings.includeNoteName)
|
||||
text = `# ${file.basename}\n\n${text}`;
|
||||
|
|
|
@ -2,14 +2,9 @@
|
|||
"url": "http://localhost:8080",
|
||||
"shared": [
|
||||
{
|
||||
"id": "234df7b7",
|
||||
"password": "0ef1504bfe83cd9ca812434caa7aacf4",
|
||||
"id": "22478da6",
|
||||
"password": "5553101a4b7cb2b47dab2bb15ba6cd51",
|
||||
"path": "Cool Test Note.md"
|
||||
},
|
||||
{
|
||||
"id": "014b266c",
|
||||
"password": "1c9459d7cdac804f72272c8f6d4a9abc",
|
||||
"path": "dir/Cool Test Note.md"
|
||||
}
|
||||
],
|
||||
"stripFrontmatter": true,
|
||||
|
|
|
@ -2,7 +2,11 @@
|
|||
test: yes
|
||||
---
|
||||
|
||||
This is a cool test note, my friends!
|
||||
This is a cool test note%%with an inline comment%%, my friends!
|
||||
|
||||
%%
|
||||
BLOCK COMMENT
|
||||
%%
|
||||
|
||||
> How are you?
|
||||
|
||||
|
@ -24,6 +28,13 @@ $.ajax({
|
|||
|
||||
cool!!
|
||||
|
||||
%%
|
||||
ANOTHER BLOCK COMMENT
|
||||
you know
|
||||
|
||||
WITH A LOT OF TEXT
|
||||
%%
|
||||
|
||||
blah blah i added and removed this
|
||||
|
||||
The following is $x^2 = 7$, but more complicated!
|
||||
|
|
Loading…
Reference in a new issue