-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backtick-fenced code blocks are not syntax-highlighted #32
Comments
Works as expected via the Ruby API.. Perhaps a bug with the # test.rb
require 'kramdown'
def convert(contents)
puts "Kramdown: #{Kramdown::VERSION}"
puts "Contents: #{contents.inspect}"
puts " Result: #{Kramdown::Document.new(contents, input: 'GFM').to_html}"
puts
end
convert <<~TXT
```python\nfoo()\n```
TXT
convert <<~TXT
~~~python\nfoo()\n~~~
TXT
|
Sorry for hijacking this issue, but I do have a similiar issue with this but it only occurs in example input:
Expected output: <details>
<summary>If you insist, here’s the details!</summary>
<p>A command is roughly defined as:</p>
<div class="language-c highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">struct</span> <span class="n">command_t</span> <span class="p">{</span>
<span class="n">command_type_t</span> <span class="n">type</span><span class="p">;</span>
<span class="n">RenRect</span> <span class="n">bounding_rectangle</span><span class="p">;</span>
<span class="n">RenColor</span> <span class="n">color</span><span class="p">;</span>
<span class="kt">char</span> <span class="o">*</span><span class="n">text</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div> </div>
</details> Obtained output: <details>
<summary>If you insist, here’s the details!</summary>
<p>A command is roughly defined as:</p>
<p><code>c
struct command_t {
command_type_t type;
RenRect bounding_rectangle;
RenColor color;
char *text;
}
</code></p>
</details> The expected output is actually obtained by switching from |
I have this issue as well. Test case: curl 'https://raw.githubusercontent.com/fastruby/fast-ruby/master/README.md' | kramdown -x parser-gfm --gfm_quirks no_auto_typographic Tried removing the |
Here's what I'm up against; should this not work?
And if I try to add
It does work as hoped if I switch the fence from backticks to tildes:
|
Ah! I didn't see which repo I was commenting in. Unlike the comment by @ashmaroli, it works if you install this gem (
|
Migrated from gettalong/kramdown#733.
Result:
Result:
The text was updated successfully, but these errors were encountered: