gettalong / kramdown

kramdown is a fast, pure Ruby Markdown superset converter, using a strict syntax definition and supporting several common extensions.
http://kramdown.gettalong.org
Other
1.72k stars 274 forks source link

Code block language not parsing in details/summary following math expression #785

Closed b0nes164 closed 1 year ago

b0nes164 commented 1 year ago

Example:

A spoiler ```ruby require 'redcarpet' markdown = Redcarpet.new("Hello World!") puts markdown.to_html ```

$1 + 1 = 2$

A spoiler ```ruby require 'redcarpet' markdown = Redcarpet.new("Hello World!") puts markdown.to_html ```

Raw markdown:

<details open>

  <summary>
  A spoiler
  </summary>

```ruby
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html

$1 + 1 = 2$

A spoiler ```ruby require 'redcarpet' markdown = Redcarpet.new("Hello World!") puts markdown.to_html ```
gettalong commented 1 year ago

Please provide a sample input document, the output when running it through the kramdown binary with your desired options, and the desired output - thanks!

b0nes164 commented 1 year ago

I apologize, I thought that kramdown was the primary parser for GitHub, not just an option, so I guess this issue isn't relevant for you.

But to give a rundown for posterity, the problem is that once you make a LaTeX-like expression with the '$' symbol, code blocks within detail/summaries are no longer colored properly with respect to their language attribute.