Hi Joshua

You may also want to look at the source of the WikiText tiddler on TW5. It
uses a macro to avoid retyping examples in code blocks:

https://github.com/Jermolene/TiddlyWiki5/blob/master/editions/tw5.com/tiddlers/concepts/WikiText.tid

The macro is:

\define wikitext-example(src)
```
$src$
```

Renders as:

$src$

In HTML:

$$$text/vnd.tiddlywiki>text/html
$src$
$$$

\end

The macro is invoked like this:

<<wikitext-example src:"This is a
paragraph made
up of
short lines">>



Best wishes

Jeremy



On Fri, Sep 20, 2013 at 4:53 AM, Joshua <[email protected]> wrote:

> I have been trying to document some of my TW5 list and filter experiments
> but found it cumbersome to maintain two versions of the code/wikitext in a
> tiddler, the version in a code block and the version that is rendered. So,
> I wondered if it was possible to create a tiddler (List1) that contains a
> list (or any code), and then in the documentation tiddler do something like
> the following.
>
> {{List1}}
>
> ```
> {{List1}}
> ```
>
> Obviously this doesn't do what I want since anything in the code block is
> not rendered, and I don't want it to be rendered but I do want the code to
> show with the spacing and end of lines preserved from the wikitext of
> actual List1. Any ideas for a lazy person?
>
> Joshua
>
> --
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Jeremy Ruston
mailto:[email protected]

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to