Skip to content

Markdown not being parsed correctly with classifier gem #2676

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

Closed
ivantsepp opened this issue Aug 1, 2014 · 6 comments
Closed

Markdown not being parsed correctly with classifier gem #2676

ivantsepp opened this issue Aug 1, 2014 · 6 comments

Comments

@ivantsepp
Copy link
Contributor

Noticed this weird html at http://jekyllrb.com/docs/configuration/#redcarpet:
configuration

I traced it back to this commit: 4cc6a0f. And I eventually figured out that require "classifier" was the problem. The simplest temporary fix is to remove this line. But anyways, I think the issue is some conflict between the classifier gem and kramdown.

[1] pry(main)> require 'kramdown'
=> true
[2] pry(main)> puts Kramdown::Document.new("- a\n\n    paragraph\n\n        # ...ruby code\n\n    paragraph\n- b\n").to_html
<ul>
  <li>
    <p>a</p>

    <p>paragraph</p>

    <pre><code>  # ...ruby code
</code></pre>

    <p>paragraph</p>
  </li>
  <li>
    <p>b</p>
  </li>
</ul>
=> nil

That works as normal. But when we include classifier:

[1] pry(main)> require 'kramdown'
=> true
[2] pry(main)> require 'classifier'
Notice: for 10x faster LSI support, please install http://rb-gsl.rubyforge.org/
=> true
[3] pry(main)> puts Kramdown::Document.new("- a\n\n    paragraph\n\n        # ...ruby code\n\n    paragraph\n- b\n").to_html
<ul>
  <li>a</li>
</ul>

<pre><code>paragraph

    # ...ruby code

paragraph - b
</code></pre>
=> nil
@troyswanson
Copy link
Member

Thanks for the detective work on this! 🔎

Ref #2662 and #2661

@alfredxing
Copy link
Member

Ref #2677.

@parkr parkr closed this as completed Aug 10, 2014
@parkr
Copy link
Member

parkr commented Aug 10, 2014

Will release the new version of Jekyll and hopefully GHP will review and merge it quickly.

@alfredxing
Copy link
Member

Doing a little digging here, and seems like mathn is the problem. In @ivantsepp's example above, if you just include mathn instead of classifier, it causes this Kramdown interference. mathn is required in classifier/extensions/vector.rb.

@parkr
Copy link
Member

parkr commented Aug 10, 2014

What about mathn does this? It seems totally benign: http://ruby-doc.org/stdlib-2.1.2/libdoc/mathn/rdoc/index.html

@alfredxing
Copy link
Member

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants