Handle interleaved matchers
See original GitHub issueI am facing issues when I interleave matchers. For a simple example I got a matcher for markdown like syntax which maps like this:
/\*(.*?)\*/ => <strong>firstCapturingGroup</strong>
/\_(.*?)\_/ => <i>firstCapturingGroup</i>
This works as expected for simple contents like *foo*
or _foo_
.
The result for interleaved content like _*foo*_
is <i>#{{0}}#</i>
instead of the intended <i><strong>foo</strong></i>
.
I understand why this happens but I couldn’t think of a simple fix/workaround. Is there a recommended way to handle this case?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Find if a string is interleaved of two other strings | DP-33
Given three strings A, B and C. Write a function that checks whether C is an interleaving of A and B. C is...
Read more >The ABCs of Interleaved ADCs - Analog Devices
Across many segments of the market today, interleaving analog-to-digital converters (ADCs) offers several advantages in many applications.
Read more >check if one string is interleaved by two other strings
1 Answer 1 ... You do need the final else if to catch the cases when the next character in C matches the...
Read more >Excel Factor 14 Interleave Data from Two Columns into One
The catch is we need to interleave the data from one column into the next. ... highlight BOTH formulas and then grab the...
Read more >[gem5-dev] Change in gem5/gem5[develop]: sim: Handle ...
Change subject: sim: Handle interleaved device memory . ... Therefore, the device memory check would fail if the interleaving masks did not match....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Got it working. Tagged
interweave@12.0.0-alpha.0
if you want to test it. There are examples in that PR.Interleaving works perfectly when separating the matchers. Appreciate your work!