joplin-plugin-enhancement icon indicating copy to clipboard operation
joplin-plugin-enhancement copied to clipboard

In-line links trip up on in-line code with square brackets

Open God-damnit-all opened this issue 1 year ago • 2 comments

Problem

Incorrect rendering in markdown editor with Enable inline link, image, and footnote rendering in markdown editor enabled:

[`[Math]::Sqrt`](https://msdn.microsoft.com/library/system.math.sqrt)


Expected result

[Math]::Sqrt


Actual result

image

God-damnit-all avatar Dec 18 '23 17:12 God-damnit-all

Oh, apparently similar problems occur when using HTML tags and when using escaped square brackets:

Example 1

[\[1\]](https://msdn.microsoft.com/library/system.math.sqrt)

image

Example 2

[<sup>\[1\]</sup>](https://msdn.microsoft.com/library/system.math.sqrt)

image

Example 3

[<sup>&lsqb;1&rsqb;</sup>](https://msdn.microsoft.com/library/system.math.sqrt)

image

God-damnit-all avatar Dec 18 '23 17:12 God-damnit-all

This is because the 'xxx' part in the link [xxx] is currently manually parsed and rendered, which is why many formats are not supported, affecting not only inline links but also blocks. Later on, it might be necessary to switch to rendering through markdown-it.

SeptemberHX avatar Jan 18 '24 01:01 SeptemberHX