TiddlyWiki markdown plugin - fenced code blocks

1,194 views
Skip to first unread message

Guy Rutenberg

unread,
Feb 6, 2015, 3:49:30 AM2/6/15
to tiddl...@googlegroups.com
Hi,

I've installed the markdown plugin for TiddlyWiki5. I've also set the Maruku dialect in $:/config/markdown/dialect. However fenced code blocks (text surrounded by ``` or ~~~) do not seem to work.

Any ideas?

Thanks,

Guy

PMario

unread,
Feb 6, 2015, 4:26:06 AM2/6/15
to tiddl...@googlegroups.com
hi guy,
did you try 4 spaces in front of the codeblock. see the markdown spec.
-m

Guy Rutenberg

unread,
Feb 6, 2015, 4:58:44 AM2/6/15
to tiddl...@googlegroups.com

Hi,

I'm aware of the four spaces syntax, which indeed works. But fenced code blocks are much more convenient and seem like should work when selecting the Maruku dialect.

Thanks,

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/UleK22MVKe4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Tobias Beer

unread,
Feb 6, 2015, 6:28:47 AM2/6/15
to
Hi Guy,

I don't quite see any ``` or ~~~ at the Maruku syntax...


Perhaps you were expecting gfm?

Best wishes, Tobias. 

Guy Rutenberg

unread,
Feb 6, 2015, 7:42:41 AM2/6/15
to tiddl...@googlegroups.com

Hi Tobias,

The file you linked to is the original  markdown syntax (it is also mentioned in the Maruku   documentation). Maruku supposedly supports the Markdown Extra syntax which defines fenced code blocks.

Thanks for your help,

Guy

On Feb 6, 2015 1:28 PM, "Tobias Beer" <beert...@gmail.com> wrote:
Hi Guy,

I don't quite see any ``` or ~~~ at the Maruku syntax...

Tobias Beer

unread,
Feb 6, 2015, 11:03:09 AM2/6/15
to tiddl...@googlegroups.com

The file you linked to is the original  markdown syntax (it is also mentioned in the Maruku   documentation). Maruku supposedly supports the Markdown Extra syntax which defines fenced code blocks.

Would be great if the author demonstrated somewhere that / how it actually does.

Best wishes, Tobias.

Jeremy Ruston

unread,
Feb 6, 2015, 1:21:33 PM2/6/15
to TiddlyWiki
My guess is that the Maruku dialect doesn't support fenced code blocks. It's difficult to figure out because the link to Maruku in the readme is broken:


From a quick scan of the code I couldn't see any implementation of fenced code blocks.

Best wishes

Jeremy.


--
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 tiddlywiki+...@googlegroups.com.

To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

BJ

unread,
Feb 6, 2015, 2:08:47 PM2/6/15
to tiddl...@googlegroups.com
Hi Guy,
I am working with a different flavor of markdown from https://github.com/chjj/marked,  with extensions for tiddlywiki that I am writing, but it will be couple of weeks until I publish a plugin.

cheers
BJ

Jeremy Ruston

unread,
Feb 6, 2015, 2:32:47 PM2/6/15
to TiddlyWiki
Hi BJ

I am working with a different flavor of markdown from https://github.com/chjj/marked,  with extensions for tiddlywiki that I am writing, but it will be couple of weeks until I publish a plugin.

Great to hear that, the existing markdown-js parser isn't great, and better integration with TiddlyWiki features would certainly be welcome.

Best wishes

Jeremy.

 

cheers
BJ


On Friday, February 6, 2015 at 2:49:30 AM UTC-6, Guy Rutenberg wrote:
Hi,

I've installed the markdown plugin for TiddlyWiki5. I've also set the Maruku dialect in $:/config/markdown/dialect. However fenced code blocks (text surrounded by ``` or ~~~) do not seem to work.

Any ideas?

Thanks,

Guy

--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Richard Edwards

unread,
Oct 27, 2015, 2:47:33 PM10/27/15
to TiddlyWiki
Hello All,
Does anyone have or know of a markdown plugin for TiddlyWiki that handles code fence blocks; i.e. something CommonMark-ish or github-ish?
I might try to make something work, but it would be so much better if someone else already has done so!
What I really want is to create tiddlers from DITA content, and I'm poking about at markdown as an intermediate conversion format.
Thanks! -red

BJ

unread,
Oct 27, 2015, 5:43:00 PM10/27/15
to TiddlyWiki
Hi red,
I got the marked version working, is this what you are after?
regards
BJ

BJ

unread,
Oct 31, 2015, 5:53:04 PM10/31/15
to TiddlyWiki
I have put a 'marked' flavor markdown plugin on bjtools

http://bjtools.tiddlyspot.com/




On Tuesday, October 27, 2015 at 6:47:33 PM UTC, Richard Edwards wrote:

Matabele

unread,
Nov 1, 2015, 1:02:45 AM11/1/15
to TiddlyWiki
Hi

Doesn't render if I copy across the markdown plugin -- what tiddler type should I be using?

regards

BJ

unread,
Nov 1, 2015, 6:44:15 AM11/1/15
to TiddlyWiki
Sorry I didn't update the site properly, that's the wrong (old) plugin. I have updated with new instructions,
all the best
BJ

Matabele

unread,
Nov 1, 2015, 7:17:37 AM11/1/15
to TiddlyWiki
Hi

$:/plugins/bj/small/mdplusdemo/parsers/markapdaper.js throws a javascript error upon reload -- are we supposed to use this plugin or only $:/plugins/bj/small/mdplusdemo. 

If so, with only the latter, your examples don't render. Perhaps this only works with flexitype installed?

regards

BJ

unread,
Nov 1, 2015, 11:42:54 AM11/1/15
to TiddlyWiki


On Sunday, November 1, 2015 at 12:17:37 PM UTC, Matabele wrote:
Hi

$:/plugins/bj/small/mdplusdemo/parsers/markapdaper.js throws a javascript error upon reload -- are we supposed to use this plugin or only $:/plugins/bj/small/mdplusdemo. 

If so, with only the latter, your examples don't render. Perhaps this only works with flexitype installed?

yes, you need to use $:/plugins/bj/plugins/marked

Matabele

unread,
Nov 1, 2015, 11:51:16 AM11/1/15
to TiddlyWiki
Hi

Thus the confusion -- screenshot from http://bjtools.tiddlyspot.com/


regards

BJ

unread,
Nov 1, 2015, 2:12:27 PM11/1/15
to TiddlyWiki

thanks - I'll sort it out.

Richard Edwards

unread,
Dec 13, 2015, 2:54:46 PM12/13/15
to TiddlyWiki
Thanks BJ!

This is very useful to me.  It works very nicely.

John Doe

unread,
Dec 29, 2015, 12:43:06 PM12/29/15
to TiddlyWiki
Thanks BJ for the excellent plugin and saving the day for me!!

However, after using your plugin i noticed that codemirror syntax highlighting has stopped working. Do you know that might be the reason?
I suspect that i will have to set xhtml: false , but i dont know how to set that.

If anyone else can help me setup syntax highlighting with marked plugin, that would really help! Thanks in advance!!

BJ

unread,
Dec 30, 2015, 9:11:33 AM12/30/15
to TiddlyWiki
I have not tried the codemirror plugin, have at look here:
https://github.com/Jermolene/TiddlyWiki5/issues/2059

cheers
BJ

John Doe

unread,
Dec 30, 2015, 11:29:56 AM12/30/15
to TiddlyWiki
Hi BJ,
    The codemirror plugin was working with the Markdown plugin (http://tiddlywiki.com/plugins/tiddlywiki/markdown/). However once i installed your plugin for x-marked, the highlighting has stopped working.

On related note, can you please brief me on how to use the Flexitype plugin to set some options of the marked plugin. I want to set highlight to true. 

Thanks in advance!

BJ

unread,
Jan 1, 2016, 4:35:36 AM1/1/16
to TiddlyWiki
I cannot produce a problem with my marked plugin when used with the codemirror plugin and the markdown plugin. This is what i did:

1.downloaded the tiddlywiki with the codemirror plugin pre-installed from tiddlywiki.com to form a local copy
2.dragged the markdown plugin from tiddlywiki.com onto my local copy
3.cloned the tiddler `$:/config/EditorTypeMappings/text/vnd.tiddlywiki` and rename the clone to$:/config/EditorTypeMappings/text/x-markdown
4.reloaded my local copy.
5.observed the line numberings from the codemirror plugin when editing a tiddler with type set to text/x-markdown.

6.dragged the marked pluggin from bjtools onto my local copy
7.cloned the tiddler `$:/config/EditorTypeMappings/text/vnd.tiddlywiki` and rename the clone to $:/config/EditorTypeMappings/text/x-marked
8.reload and when editing a tiddler with type text/x-markdown or text/x-marked I see the line numbers from the markdown plugin

do you have a different setup?

w.r.t the highlight parser option for text/x-marked - this needs another javascript lib to be ported to tiddlywiki for anything to work, so is probably not useful for you.

all the best BJ

John Doe

unread,
Jan 1, 2016, 7:37:54 AM1/1/16
to TiddlyWiki
Thanks for the reply BJ. I am sorry if i did not describe the problem properly previously. Let me restate the problem again:

Only the color highlighting feature from the codemirror is not working with the x-marked.
It was working perfectly with the x-markdown plugin that comes with Tiddlywiki.
 
After playing around with it for a week i am considering whether to use the x-marked or the default wikiText that Tiddlywiki provides. Since there are some things i would like to have that are not provided by the x-marked plugin. For eg. Linking to other Tiddlers, highlighting text using the ==Text== syntax, quick css inside the text etc.

BJ

unread,
Jan 2, 2016, 4:39:08 AM1/2/16
to TiddlyWiki
Hi John,
thanks for the clarity, I will open an issue to track this problem.

 x-marked as it is not flexible enough for general tiddlywiki use, its use lies obviously in compatibility with systems outside tiddlywiki. (importing existing documents for instance) .
I would prefer to use an extended version of markdown than tiddlywikitext - it is just finding the right approach - I will probably experiment with making a version of tiddlywikitext that is more like markdown.
Reply all
Reply to author
Forward
0 new messages