Paragraph strip mode ([[a_]]) suppresses newlines within the anchor
body and strips trailing newlines after the closing tag. This prevents
unwanted <br> elements when consecutive anchor blocks are placed on
separate lines.
The target attribute is extracted and mapped to a semantic enum value
("new-tab", "parent", "top", "same"), while the remaining
attributes (including href) are passed through after URL sanitization.
Parses the Wikidot anchor inline block syntax:
[[a]]...[[/a]].An anchor wraps inline content in an HTML
<a>element, allowing href, target, and other HTML attributes to be specified.Wikidot syntax variants:
[[a href="url"]]text[[/a]]-- basic anchor with href[[a_ href="url"]]text[[/a]]-- paragraph strip mode (trailing underscore)Paragraph strip mode (
[[a_]]) suppresses newlines within the anchor body and strips trailing newlines after the closing tag. This prevents unwanted<br>elements when consecutive anchor blocks are placed on separate lines.The
targetattribute is extracted and mapped to a semantic enum value ("new-tab","parent","top","same"), while the remaining attributes (includinghref) are passed through after URL sanitization.