laysent / remark-ruby

Custom syntax for remarkjs, adding ruby (furigana) to markdown.
MIT License
25 stars 7 forks source link

Can't parse in <code> tag md file #1

Closed dulx96 closed 5 years ago

dulx96 commented 5 years ago

Im using gatsby newest version with gatsby-transformer-remark within plugin gatsby-remark-ruby All h1,h2,..p, codeblock work well except tag

this is a code {紳士}^(へんたい)

can any one give me a soluyion ? thanks

laysent commented 5 years ago

Hi @dulx96 , when you use ` to produce code tag, I believe what's inside should be considered as plain text and should not be transformed. Example:

html

`. Thus, plugin should not transform text inside. If you wish to have ruby inside code tag, I would recommend to write html directly. Example:

<code><ruby>紳士<rp>(</rp><rt>へんたい</rt><rp>)</rp></code>
dulx96 commented 5 years ago

Hi @dulx96 , when you use ` to produce code tag, I believe what's inside should be considered as plain text and should not be transformed. Example:

html

`. Thus, plugin should not transform text inside. If you wish to have ruby inside code tag, I would recommend to write html directly. Example:

<code><ruby>紳士<rp>(</rp><rt>へんたい</rt><rp>)</rp></code>

thanks, u help me a lot