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

67 views
Skip to first unread message

Charlie Veniot

unread,
Sep 11, 2022, 3:34:17 PM9/11/22
to TiddlyWiki

Charlie Veniot

unread,
Sep 12, 2022, 12:40:26 AM9/12/22
to TiddlyWiki
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.)

Screenshot 2022-09-12 1.36.55 AM.png

On Sunday, September 11, 2022 at 4:34:17 PM UTC-3 Charlie Veniot wrote:
https://youtu.be/yIdaa9Rgsew

Charlie Veniot

unread,
Sep 15, 2022, 1:15:19 AM9/15/22
to TiddlyWiki
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.

Charlie Veniot

unread,
Sep 15, 2022, 1:16:26 AM9/15/22
to TiddlyWiki
Oops, forgot to attach image:

Screenshot 2022-09-15 2.09.50 AM.png

Charlie Veniot

unread,
Sep 22, 2022, 2:59:30 PM9/22/22
to TiddlyWiki
Added highlight of macro/variable references, i.e. anything looking like ```<<name>>```

Added highlight of widget end (i.e. ```/>``` or ```</$widget>```
SyntaxHighlightingTinyEditor.json
Reply all
Reply to author
Forward
0 new messages