Eric/ Atronoush
Eric, I really like that. Just some thoughts as a result.
- It would be nice to extend this also to a wikified version as well.
- And perhaps a code view with line numbers from the source.
- Perhaps a tool for selecting the start and end lines in the source
tiddler would be cool
Atronoush
- I imagine your code tiddler has a different "type" field set, also
you are using codemirror because its editor lists line numbers.
- There are code highlighters available as well in tiddlywiki
Regards
Tones
On Thursday, 26 November 2020 at 09:26:14 UTC+11 Eric Shulman wrote:
> Place the following in a tiddler (e.g., "ShowLinesMacro"), tagged with
> $:/tags/Macro"
> \define showLines(tid,from,to)
> <$vars length={{{ [[$to$]subtract[$from$]add[1]] }}}>
> <$set name="lines"
> filter="[[$tid$]get[text]splitregexp[\n]first[$to$]last<length>]">
> <pre><$list filter="[enlist:raw<lines>]" variable="line"><$text
> text=<<line>>/><br></$list></pre>
> </$set>
> </$vars>
> \end
>
> which can then be invoked using:
> <<showLines "Slab Catalyst" 3 5>>
> <hr>
> <<showLines "Slab Catalyst" 8 19>>
>
> enjoy,
> -e
>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/b5962cb3-2842-4d02-bd2f-88eb7d159caen%40googlegroups.com.