-
I am having trouble understanding in the code how
How and when is it ensured that the part of the new header that is appended as a suffix in the second pattern is later moved back to the front? Or more clear: where the suffix later is removed? At some point and somewhere, yes, the part is moved from the suffix back to the prefix. This works correctly for Markdown, but since I modified the PREFIX_ATX_HEADING a bit for AsciiDoc, it doesn't work correctly with it: Markdown
AciiDoc
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Can I perhaps already prepare a pull request, even if there are still open questions? So then you can clarify questions based on WIP code? |
Beta Was this translation helpful? Give feedback.
-
So regexReplaceAction runs through a list of search and replace pairs and performs the replace for the first pattern it matches. It is a way of expressing if - else if - else if with regex statements. i.e. regexReplaceAction will run this on every selected line while chunking the changes and maintaining selection properly etc etc. |
Beta Was this translation helpful? Give feedback.
-
I understand this in General, but I don't understand why it doesn't work in some cases, as I want. Should I do this as a Pull Request from my Fork into the Markor Repo? Or should I keep it in my fork, until is is ready? |
Beta Was this translation helpful? Give feedback.
So regexReplaceAction runs through a list of search and replace pairs and performs the replace for the first pattern it matches.
It is a way of expressing if - else if - else if with regex statements.
i.e.
if condition 1 matches do replace 1 and terminate
if condition 2 matches do replace 2 and terminate
....
regexReplaceAction will run this on every selected line while chunking the changes and maintaining selection properly etc etc.