erixtekila / gitbook-plugin-richquotes

Gitbook plugin : Transform annoted quotes to notes
Apache License 2.0
49 stars 14 forks source link

Use GitBook 2.0 block tags? #13

Closed leesei closed 8 years ago

leesei commented 9 years ago

What do you think of using block tags instead of hacking ```? The quote type will be one of the parameter and would not interfere with the content of the quote.

> **Info** Info quotes

to

{% richquotes info %}
Info quotes
{% endrichquotes %}

Optionally we can strip /$>[\s]*/ to accept this:

{% richquotes info %}
> Info quotes
{% endrichquotes %}

(I think the Github parser parsed it wrongly.)

erixtekila commented 9 years ago

That may be good idea. I ddin't get the time to read the last plugins features. WIll check that.

leesei commented 9 years ago

I did an experiment.

{% myTag %}*World*{% endmyTag %}

yields

Hello *World*

The content is not passed to Markdown pipeline so we can no longer use Markdown. We have to use HTML tags unless we're parsing blk.body in the handler.

{% myTag %}<i>World</i>{% endmyTag %}

I think that is a limitation of block tags. I would open an issue on GitBook to discuss the merits of template block tags.

glueckpress commented 9 years ago

+1 for what @leesei says, Markdown inside of block level HTML elements will not be parsed:

Note that Markdown formatting syntax is not processed within block-level HTML tags. E.g., you can’t use Markdown-style emphasis inside an HTML block.

As attractive as block level elements seem for common use cases of this plugin, I think they justify another plugin rather than modifying this one.