Conversation
Match characters instead of using regex. This now allows for an unlimited name length and new lines in the content.
Codecov Report
@@ Coverage Diff @@
## master #32 +/- ##
==========================================
- Coverage 93.20% 93.04% -0.17%
==========================================
Files 24 24
Lines 1237 1251 +14
==========================================
+ Hits 1153 1164 +11
- Misses 84 87 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
webknjaz
left a comment
There was a problem hiding this comment.
How about adding a test case with a line break in between the backticks to cover executablebooks/MyST-Parser#448?
| <p>a <code class="myst role">{abc}[xyz]</code> b</p> | ||
| . | ||
|
|
||
| New lines: |
There was a problem hiding this comment.
@webknjaz that test is already here. Is there any other fixtures you can think of before I merge
There was a problem hiding this comment.
How about a more complex case with spaces in the reference between angled braces?
{ref}`some
text
<and
a
custom reference>`There was a problem hiding this comment.
thanks for the quick reply
This complexity won't particularly make a difference here though: the markdown-plugin just stores everything inside the ticks as a raw string (now replacing new lines with spaces), then the token (with name+content) is processed specifically by myst-parser. i.e. it doesn't really matter what is inside the ticks (in the example above the token's content will be some text <and a custom reference>)
There was a problem hiding this comment.
Got it. But I'd still have some regression test for this, if not in this lib, then in some other place maybe?
There was a problem hiding this comment.
Yep, I can add a test like this in myst-parser, when I downstream this change to there 👍
|
Does (or could) the unlimited length thing also apply to executablebooks/MyST-Parser#181? |
yep indeed 👍, thank for pointing that out |
Match characters instead of using regex.
This now allows for an unlimited name length and new lines in the content.