Hi Ivica

There's been some discussion previously about using a better Markdown
parser:

https://github.com/Jermolene/TiddlyWiki5/issues/474

There's also a similar issue about the highlight plugin not working in
Markdown tiddlers:

https://github.com/Jermolene/TiddlyWiki5/issues/979

Updating a new Markdown parser will still require some additional work to
allow us to integrate KaTeX and the Highlight plugin. Ideally, the new
Markdown parser would give us a parse tree of the HTML output, rather than
a raw HTML string.

Best wishes

Jeremy





On Tue, Dec 2, 2014 at 8:24 PM, Ivica Nakić <[email protected]> wrote:

> Thanks Jeremy for the quick answer!
>
> I suppose the problem is that markdown-js escapes HTML, which is a more
> general problem because sometimes it is nice to be able to use html tags.
> For example, a tiddler with the text <strong>Bold</strong> is correctly
> rendered as *Bold *for wikitext type, unlike in markdown type where you
> get <strong>Bold</strong>.
> I played a little with other markdown libraries, and they usually don't
> have this problem. For example, marked (
> https://www.npmjs.org/package/marked) plays nicely with mathjax (so
> probably with katex also, I'm just more familiar with mathjax). This html
> is rendered correctly, I only had to escape \ne in $a \ne 0$.
>
> <!doctype html>
> <html>
> <head>
>   <meta charset="utf-8"/>
>   <title>Marked in the browser</title>
>   <script src="marked.js"></script>
>   <script type="text/x-mathjax-config">
> MathJax.Hub.Config({
>   tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
> });
> </script>
>   <script type="text/javascript"
>   src="
> http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML
> ">
> </script>
> </head>
> <body>
>   <div id="content"></div>
>   <script>
>     document.getElementById('content').innerHTML =
>       marked('# Marked in browser\n\nRendered by **marked**, when $a \\ne
> 0$');
>   </script>
> </body>
> </html>
>
>
> I don't know how difficult it would be to change the markdown library, but
> you might consider it in light of this problem.
>
> Ivica
>
>
>
> Dana utorak, 2. prosinca 2014. 16:19:18 UTC+1, korisnik Jeremy Ruston
> napisao je:
>>
>> Hi Ivica
>>
>> The KaTeX plugin does indeed only work within TW5 wikitext tiddlers. It
>> may be possible to update it to work with Markdown but it's not something
>> I've got immediate plans for - it's likely to require detailed knowledge of
>> the operation of the Markdown library that we're using.
>>
>> Best wishes
>>
>> Jeremy.
>>
>>
>> On Tue, Dec 2, 2014 at 3:13 PM, Ivica Nakić <[email protected]> wrote:
>>
>>> Seems like those two plugins don't play together nicely.
>>> More precisely, if a tiddler has the type text/x-markdown, then math
>>> doesn't get processed,
>>> both the $$ or <$latex> syntax.
>>>
>>> Ivica
>>>
>>> --
>>> 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/d/optout.
>>>
>>
>>
>>
>> --
>> Jeremy Ruston
>> mailto:[email protected]
>>
>


-- 
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/d/optout.

Reply via email to