You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this is the markdown I'm trying to parse {.replace-me data-tex="e^{i\pi}=-1"}
Current output (e.g. RunKit):
<p>this is the markdown I'm trying to parse {.replace-me data-tex="e^{i\pi}=-1"}</p>
Expected output:
<pclass="replace-me" data-tex="e^{i\pi}=-1">this is the markdown I'm trying to parse</p>
As additional info, in some application environment (TiddlyWiki) I got:
<pclass="replace-me" data-tex="e^{i\pi">this is the markdown I'm trying to parse}=-1</p>
So at the end it seems that the closing brace interferes with the md opening one.
I imagine that escaping them in the user field could be a solution, but often there is no direct access to field value as it could be auto-generated, or the escaping of all braces could be time-consuming.
Another solution could be change the delimiters to other parenthesis, but again I would suspect that this could interfere with value content or other md constructs/plugins...
Finally, inspecting the code I found something like HTML_REPLACEMENTS, maybe (but I don't know if it is correct) the set of special chars could be extended to include other conflicting chars for a sort of automatic escaping?
So it would be possible to escape braces in the attribute values automatically from the code?
Thanks and regards
The text was updated successfully, but these errors were encountered:
case'end':
// last char should be }start=str.lastIndexOf(options.leftDelimiter);end=start===-1 ? -1 : str.indexOf(options.rightDelimiter,start+rightDelimiterMinimumShift);end=end===str.length-options.rightDelimiter.length ? end : -1;break;
In above code, str.lastIndexOf(options.leftDelimiter) will be { inside attributes, not outside.
Markdown-it versions: not available (maybe 2021)
Example input:
Current output (e.g. RunKit):
Expected output:
As additional info, in some application environment (TiddlyWiki) I got:
So at the end it seems that the closing brace interferes with the md opening one.
I imagine that escaping them in the user field could be a solution, but often there is no direct access to field value as it could be auto-generated, or the escaping of all braces could be time-consuming.
Another solution could be change the delimiters to other parenthesis, but again I would suspect that this could interfere with value content or other md constructs/plugins...
Finally, inspecting the code I found something like HTML_REPLACEMENTS, maybe (but I don't know if it is correct) the set of special chars could be extended to include other conflicting chars for a sort of automatic escaping?
So it would be possible to escape braces in the attribute values automatically from the code?
Thanks and regards
The text was updated successfully, but these errors were encountered: