[tw5] Prototype: Syntax Highlighter for TiddlyWiki (no javascript; just HTML, CSS, and TiddlyWiki widgets

5 Likes

Had to do some fancy footwork to handle TiddlyWiki’s wikitext, widgets, macros, transclusions.

(The red squiggly underline in the screenshot below, that’s just my web browser highlighting a spelling issue.)

1 Like

I wasn’t happy with general performance, so I rejigged what I had to address that and to also handle a few things that were tripping up the syntax highlighting.

Things like carriage returns, multiple spaces, double-quotes, carets, etc.

If you can think of anything you would type into TiddlyWiki text that could trip up regular expression handling (for syntax coloring), let me know.

Next: I want to start adding some syntax coloring for TiddlyWiki things. If you have preferences, let me know.

Oops, forgot to attach image:

1 Like

Added highlight of macro/variable references, i.e. anything looking like <<name>>

Added highlight of widget end (i.e. /> or </$widget>

SyntaxHighlightingTinyEditor.json (4.36 KB)