match
.match content:{InlineMarkdownContent} \
pattern:{String} \
replacement:{Lambda}
-> NodeFinds every substring of content that matches the regular expression pattern and replaces each match with the inline content produced by replacement.
Matches are searched within plain text leaves only: existing inline structure (links, emphasis, code spans, transformed text, etc.) is preserved around the matches.
The replacement lambda receives the matched substring as its single argument and returns inline content to insert in its place. If pattern is empty, content is returned unchanged.
Example:
.match {Quarkdown takes its name from quarks} pattern:{[Qq]uark(down|s)?}
match:
**.match**Output:
Quarkdown takes its name from quarks
Return
content with every match of pattern replaced by the output of replacement
Parameters
inline content to scan for matches
regular expression to match
- Likely a body argument
lambda invoked with each matched substring, producing the inline content that replaces it
Throws
if pattern is not a valid regular expression