Skip to content

How does this differ from jekyll-commonmark? #17

@0xdevalias

Description

@0xdevalias

(Similar question posted at jekyll/jekyll-commonmark#39)

I notice that while the readme for jekyll-commonmark talks about using libcmark, it actually appears to achieve this via the commonmarker gem.

Looking at commonmarker, it talks about being a ruby wrapper for libcmark-gfm, which apparently includes all of the GFM extensions already:

Ruby wrapper for libcmark-gfm, GitHub's fork of the reference parser for CommonMark. It passes all of the C tests, and is therefore spec-complete. It also includes extensions to the CommonMark spec as documented in the GitHub Flavored Markdown spec, such as support for tables, strikethroughs, and autolinking.

This would make me think that jekyll-commonmark by itself already supports GFM, and so i'm wondering what jekyll-commonmark-ghpages provides above/beyond that, particularly as this project also uses the same commonmarker gem.

--

Adding jekyll-commonmark to my Gemfile resulted in the following in my Gemfile.lock:

jekyll-commonmark (1.3.1)
      commonmarker (~> 0.14)
      jekyll (>= 3.7, < 5.0)

commonmarker (0.21.0)
      ruby-enum (~> 0.5)

Resetting, then adding jekyll-commonmark-ghpages to my Gemfile resulted in the following in my Gemfile.lock:

jekyll-commonmark-ghpages (0.1.6)
      commonmarker (~> 0.17.6)
      jekyll-commonmark (~> 1.2)
      rouge (>= 2.0, < 4.0)

jekyll-commonmark (1.3.1)
      commonmarker (~> 0.14)
      jekyll (>= 3.7, < 5.0)

commonmarker (0.17.13)
      ruby-enum (~> 0.5)

So jekyll-commonmark-ghpages gives us an additional version dependency on rouge, but we already get that via jekyll anyway:

jekyll (4.1.1)
      ..snip..
      rouge (~> 3.0)

By the looks of this, by using jekyll-commonmark instead of jekyll-commonmark-ghpages I would actually be getting a more up to date version of commonmarker (and thus the underlying c implementation), that supports GFM. Which to me, at face value, is definitely not what I would have expected.

I can see that there is a semi-related issue / PR (#13 , #15) talking about loosening the version lock on the commonmarker dependency, which would allow it to get the same newer version as jekyll-commonmark currently is able to. I also noticed #11 that talks about documenting the fact that commonmarker is used under the hood, rather than a direct dependency on libcmark-gfm as this project's readme implies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions