Describe the bug
If using LaTeX math with $$
above a horizontal divider (---
), the $$
is replaced with $
upon note review, i.e. $$ \int_{0}^{100}x^{2} $$
becomes $ \int_{0}^{100}x^{2} $
This appears to be caused by two bugs:
SCHEDULING_INFO_REGEX
matching until the last ---
in the file.
/^---\n((?:.*\n)*)sr-due: (.+)\nsr-interval: (\d+)\nsr-ease: (\d+)\n((?:.*\n)*)---/;
to /^---\n((?:.*\n)*)sr-due: (.+)\nsr-interval: (\d+)\nsr-ease: (\d+)\n((?:.*\n)?)---/;
matches only until the next ---
and does not cause this issue$$
in the front matter are replaced with $
To Reproduce
$$
to open and close the block---
) below the math block#review
tag to the note$$
before the last ---
will have been replaced with $
Expected behavior
No text outside of the scheduling info/flashcard info will be changed by the plugin.
Versions:
Additional context
Reviewing this note will cause the issue for the first math block, but not the second:
---
sr-due: 2022-11-10
sr-interval: 1
sr-ease: 140
---
This is some text.
---
This math will be changed
$$ \int_{0}^{100}x^{2} $$
---
This math will be fine
$$ \int_{0}^{100}x^{2} $$
#review
Owner Name | st3v3nmw |
Repo Name | obsidian-spaced-repetition |
Full Name | st3v3nmw/obsidian-spaced-repetition |
Language | TypeScript |
Created Date | 2021-01-30 |
Updated Date | 2023-03-19 |
Star Count | 817 |
Watcher Count | 9 |
Fork Count | 94 |
Issue Count | 174 |
Issue Title | Created Date | Updated Date |
---|