On Monday, May 6, 2013 10:19:56 PM UTC+2, carlos duarte wrote:
>
> by any chance do you know how to "wrap" a transcluded tiddler in code?
> let's say i have a tiddler that contains a bash script (non-syntax
> highlighted), and then i want to transclude it somewhere else, but i want
> the transclusion to be syntax highlighted... how do i do that?
>
I think there is no simple way to achieve that, because transcluding
tiddler text without {{{}}} will transform line breaks to <br> elements.
so if you have
[mario:~] $ cd
[mario:~] $ ls -a
it will be highlighted like that
[mario:~] $ cd<br>[mario:~] $ ls -a
see the <br> element
--------
Is there a problem, if you have a tiddler eg: myScript that contains:
<code class="brush:bash">
[mario:~] $ cd
[mario:~] $ ls -a
</code>
or
{{{
[mario:~] $ cd
[mario:~] $ ls -a
}}}
if you transclude <<tiddler myScript>> you'll get a syntax highglighted
version
For the second version you'll need create a tiddler named: zzConfig tagged
systemConfig
that contains
config.options.chkGuessSyntax = true;
config.options.chkExpertSyntax = true;
config.options.txtShText = 'brush:bash';
-----
but I think there is no way around the {{{}}} or //{{{ //}}} ....
see: http://syntaxhighlighter.tiddlyspace.com/#SyntaxHighlighterPlugin3Info
for more info.
have fun!
mario
--
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.