The simplest way to have active wikitext within a code block is to use the
underlying HTML tags instead of the triple backticks:
\rules except italic
<pre><code>
function parentChunk() {
console.log("let's include another chunk below");
// [[Included chunk name]]
}
</code></pre>
I’ve included `rules except italic` to suppress the parsing of double slashes
as italics.
The approach could be made more convenient by using a template and invoking it
with a macro.
Best wishes
Jeremy.
> On 10 May 2016, at 10:51, Ruslan Prokopchuk <[email protected]> wrote:
>
> Hi!
>
> I think TiddlyWiki fits perfectly for literate programming. The only thing I
> miss (except tangling sources for passing to the compiler, but it is easy
> implemented as an external tool) is an ability to support wikilinks in
> codeblocks. I mean that stuff like that:
>
> ```
> function parentChunk() {
> console.log("let's include another chunk below");
> // [[Included chunk name]]
> }
> ```
>
> to be rendered as
>
> function parentChunk() {
> console.log("let's include another chunk below");
> // Included chunk name <x-msg://9/> <---- link to the tiddler! <a> tags
> are allowed inside <pre> and <code> ones AFAIK
> }
>
> Is it possible to shadow codeblock macro to add support for that? How to do
> that?
>
>
> --
> 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]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/tiddlywiki
> <https://groups.google.com/group/tiddlywiki>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/4b8aaa19-0640-4f46-9101-9a755496bbae%40googlegroups.com
>
> <https://groups.google.com/d/msgid/tiddlywiki/4b8aaa19-0640-4f46-9101-9a755496bbae%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
--
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/170C76DD-41C5-4E8A-AB58-07E7888263B6%40gmail.com.
For more options, visit https://groups.google.com/d/optout.