Hi all,
I needed a way to dynamically give me cross-links within my Wiki, but I couldn't MakeEverything a CamelCase link. And I didn't want to <<tag manually>> wrap everything in appropriate <<tag tags>>.
So, here's a beta of a parser that looks through all non-system tags, finds matches in the text of a Tiddler, and wraps them with a <<smalltag ... >> macro. (This is just a better-behaving Tag macro).
Updates:
Some bugs fixed:
- Now wraps only the first occurence of a tag-word, making for much more visually clean text
- Honours the prefix to not wrap in a pill, much like ~Don'tLinkCamelCase works.
- Doesn't wrap the left-side of words with apostrophes, if that side is a tag
- Editing a Tiddler no longer un-AutoPills the whole Tiddler until you save/reload
- Regex no longer kills double-apostrophese at the end of a word, thus killing the bold parser
Some bugs remain:
- Still constrained by tag-cache - adding a tag doesn't AutoPill until you save/reload
- Matches every instance in a list, as each list gets iterated separately
Try it at
http://david.szego.me/autopill.htmlCheers,
David.