mirror of
https://github.com/Ellpeck/ObsidianJustSharePlease.git
synced 2024-11-23 02:48: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)
|
if (this.settings.stripFrontmatter)
|
||||||
text = text.replace(/^---\s*\n.*?\n---\s*\n(.*)$/s, "$1");
|
text = text.replace(/^---\s*\n.*?\n---\s*\n(.*)$/s, "$1");
|
||||||
|
|
||||||
|
// strip comments
|
||||||
|
text = text.replace(/%%.*?%%/sg, "");
|
||||||
|
|
||||||
// include note name
|
// include note name
|
||||||
if (this.settings.includeNoteName)
|
if (this.settings.includeNoteName)
|
||||||
text = `# ${file.basename}\n\n${text}`;
|
text = `# ${file.basename}\n\n${text}`;
|
||||||
|
|
|
@ -2,14 +2,9 @@
|
||||||
"url": "http://localhost:8080",
|
"url": "http://localhost:8080",
|
||||||
"shared": [
|
"shared": [
|
||||||
{
|
{
|
||||||
"id": "234df7b7",
|
"id": "22478da6",
|
||||||
"password": "0ef1504bfe83cd9ca812434caa7aacf4",
|
"password": "5553101a4b7cb2b47dab2bb15ba6cd51",
|
||||||
"path": "Cool Test Note.md"
|
"path": "Cool Test Note.md"
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "014b266c",
|
|
||||||
"password": "1c9459d7cdac804f72272c8f6d4a9abc",
|
|
||||||
"path": "dir/Cool Test Note.md"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"stripFrontmatter": true,
|
"stripFrontmatter": true,
|
||||||
|
|
|
@ -2,7 +2,11 @@
|
||||||
test: yes
|
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?
|
> How are you?
|
||||||
|
|
||||||
|
@ -24,6 +28,13 @@ $.ajax({
|
||||||
|
|
||||||
cool!!
|
cool!!
|
||||||
|
|
||||||
|
%%
|
||||||
|
ANOTHER BLOCK COMMENT
|
||||||
|
you know
|
||||||
|
|
||||||
|
WITH A LOT OF TEXT
|
||||||
|
%%
|
||||||
|
|
||||||
blah blah i added and removed this
|
blah blah i added and removed this
|
||||||
|
|
||||||
The following is $x^2 = 7$, but more complicated!
|
The following is $x^2 = 7$, but more complicated!
|
||||||
|
|
Loading…
Reference in a new issue