Skip to content
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
Closed

Markdown not being parsed correctly with classifier gem #2676

ivantsepp opened this issue Aug 1, 2014 · 6 comments

Comments

@ivantsepp
Copy link
Contributor

@ivantsepp 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
Copy link
Member

@troyswanson troyswanson commented Aug 1, 2014

Thanks for the detective work on this! 🔎

Ref #2662 and #2661

@alfredxing
Copy link
Member

@alfredxing alfredxing commented Aug 10, 2014

Ref #2677.

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

@parkr 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

@alfredxing 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
Copy link
Member

@parkr 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

parkr added a commit that referenced this issue Aug 13, 2014
@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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.