obsidian-linter
obsidian-linter copied to clipboard
FR: Handle Adding `>` to Math Blocks Lines in a Callouts/Bloquotes when the Opening Line Does Have It
- [x] I have verified that I am on the latest version of the Linter
Describe the Bug
in callout like $$\n (content) \n $$ that triggers a command with one and only one line before and after the paragraph
How to Reproduce
-
turn on paragraph line break options。
-
Example to reproduce issue with
> [!theorem|*] Argument principle
> Suppose f is a meromorphic function on an open set containing a circle $C$ and it's interior. If $f$ has no poles and never vanishing on $C$, then
> $$
\frac{1}{2\pi i}\int_{C} \frac{f'(z)}{f(z)}dz=
>$$
>(number of zores of $f$ inside $C$ ) mimus (number of poles of $f$ inside C).
-
ctrl+s
Hey @math-feng . Could you provide the expected output?
I am seeing a potential problem with the formatting. The parser the Linter uses expects math blocks in a blockquote to have the blockquote indicator at the start of the line. So your blockquote should look like so:
> [!theorem|*] Argument principle
> Suppose f is a meromorphic function on an open set containing a circle $C$ and it's interior. If $f$ has no poles and never vanishing on $C$, then
> $$
> \frac{1}{2\pi i}\int_{C} \frac{f'(z)}{f(z)}dz=
> $$
>(number of zores of $f$ inside $C$ ) mimus (number of poles of $f$ inside C).
It looks like if I use the format above, there is no issue with the math block. So I want to say this is not an issue in the Linter. Please feel free to give feedback on this though.
It is true that following the format you provided does not produce the error anymore. But could you please add a function: in callout $$... $$ includes math expressions with the symbol ">" at the beginning of the line.
I am not sure that I can. The parser does not consider that content to be a part of the blockquote and it is not considered to be a part of the math block. So I am not entirely sure how fixing it would work in this case as most operations operate on the parser's results and math blocks are allowed to have $
indicators in them. I don't know that I know enough about the math block format to properly fix this scenario. I wilk think about more on this, but I am open to ideas on how to make thos work in the meantime.
I have only seen one other reported instance of this #1013 .