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

Markdown not being parsed correctly with classifier gem #2676

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

Comments

Projects
None yet
5 participants
@ivantsepp
Contributor

ivantsepp commented Aug 1, 2014

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

This comment has been minimized.

Show comment
Hide comment
@troyswanson

troyswanson Aug 1, 2014

Member

Thanks for the detective work on this! 🔎

Ref #2662 and #2661

Member

troyswanson commented Aug 1, 2014

Thanks for the detective work on this! 🔎

Ref #2662 and #2661

@alfredxing

This comment has been minimized.

Show comment
Hide comment
@alfredxing
Member

alfredxing commented Aug 10, 2014

Ref #2677.

@parkr parkr closed this Aug 10, 2014

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Aug 10, 2014

Member

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

Member

parkr commented Aug 10, 2014

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

@alfredxing

This comment has been minimized.

Show comment
Hide comment
@alfredxing

alfredxing Aug 10, 2014

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.

Member

alfredxing commented Aug 10, 2014

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

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Aug 10, 2014

Member

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

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

This comment has been minimized.

Show comment
Hide comment

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017

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