Folks, If you look at the core tiddler $:/core/modules/parsers/wikiparser/rules/horizrule.js
(on a copy of empty.html to be safe)
- You will see it has a regular expression to detect three hyphens, presumably at the begining of a line, or on its own line
this.matchRegExp = /-{3,}\r?(?:\n|$)/mg;
- Then if matched replaces this with
<hr>
My Regular expression skills are week at best, so I hope someone can tell me the regular expression to match ↩︎
anywhere in the text
- Then I will clone this tiddler change this to replace
↩︎
with<br>
during the parsing. - I will make an editor toolbar in support of this, and share back
The idea is to find a single character ↩︎
replacement for the use of <br>
in wikitext which looks ugly in text otherwise devoid of html tags.
Your assistance would be greatly appreciated.
Post script;
- The same regexp can possibly used for many different single character to html tag parser one could think of.
- Although different parser code may be needed to wrap text etc… ie identify the end of line, which I think
this.matchRegExp = /-{3,}\r?(?:\n|$)/mg;
is doing.