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

kramdown GFM is not enable? #5980

Closed
garin opened this issue Mar 25, 2017 · 8 comments · Fixed by #6247
Closed

kramdown GFM is not enable? #5980

garin opened this issue Mar 25, 2017 · 8 comments · Fixed by #6247

Comments

@garin
Copy link

garin commented Mar 25, 2017

I'm setting kramdown's GFM support

_config.yml

markdown: kramdown
kramdown:
  input: GFM

but unenable GFM format

pry-byebug

Kramdown::Document.new(content, @config).to_html

    42: def convert(content)
    43:    binding.pry
 => 44:   Kramdown::Document.new(content, @config).to_html
    45: end

[1] pry(#<Jekyll::Converters::Markdown::KramdownParser>)> p @config
=> {"auto_ids"=>true,
 "toc_levels"=>"1..6",
 "entity_output"=>"as_char",
 "smart_quotes"=>"lsquo,rsquo,ldquo,rdquo",
 "input"=>"GFM",                             # GFM enable ? 
 "hard_wrap"=>false,
 "footnote_nr"=>1,
 "syntax_highlighter"=>"rouge",
 "syntax_highlighter_opts"=>{},
 "coderay"=>{}}

with all @config optoins
> Kramdown::Document.new("aaa\nbbb", @config).to_html
=> "<p>aaa\n" + "bbb</p>\n"           # not with linebreak

input GMF option only 
> Kramdown::Document.new("aaa\nbbb", input: 'GFM').to_html
=> "<p>aaa<br />\n" + "bbb</p>\n"     # with linebreak. (I want this behavior)

environment

  • debian-9
  • ruby-2.4.1
  • jekylly-3.4.3
  • kramdown-1.13.2
@DirtyF
Copy link
Member

DirtyF commented Mar 25, 2017

/cc @jekyll/build

@parkr
Copy link
Member

parkr commented Mar 25, 2017

Hm, this might be a question for @gettalong. It looks like we're using kramdown properly, based on your pry output.

@gettalong
Copy link

@parkr @garin Looks like the config uses the string key "input" instead of the symbol :input.

@parkr
Copy link
Member

parkr commented Mar 25, 2017

That would do it! Thank you, @gettalong.

I believe our code turns these keys into symbols... If not, we should add a test & symbolize the keys!

@mattr- mattr- removed their assignment Mar 27, 2017
@jekyllbot
Copy link
Contributor

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the 3.3-stable or master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider building it first as a plugin. Jekyll 3 introduced hooks which provide convenient access points throughout the Jekyll build pipeline whereby most needs can be fulfilled. If this is something that cannot be built as a plugin, then please provide more information about why in order to keep this issue open.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

@jekyllbot jekyllbot added the stale Nobody stepped up to work on this issue. label May 27, 2017
@iceman201
Copy link

I have same issue with my jekyll page.
any fix update?

@jekyllbot jekyllbot removed the stale Nobody stepped up to work on this issue. label Jul 22, 2017
@parkr
Copy link
Member

parkr commented Jul 26, 2017

@gettalong Our code currently uses default_proc to give access for symbolized keys. It looks like Options.merge doesn't handle that.

@parkr
Copy link
Member

parkr commented Jul 26, 2017

Patch ready for review: #6247

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

Successfully merging a pull request may close this issue.

7 participants