Closed safinaskar closed 6 years ago
I just came here while searching how to enable the table extension. +1 from me.
I still don't understand one thing. https://githubengineering.com/a-formal-spec-for-github-markdown/ says that github forked cmark for implementing extensions. So,
commonmarker
lib depends on forked cmark
. So, this commonmarker
don't implement extension on its own, it simply uses extensions from forked cmark
?commonmarker
lib depends on any cmark
and implements extenstions on its own?commonmarker
depends on the forked cmark
; see the submodule in the vendor
directory.
We (GitHub) use this exact gem as part of github.com; when you require 'commonmarker'
, you're doing the precise same thing we're doing; the extensions in our forked cmark
are consumed through commonmarker
.
@kivikakk , thanks a lot for your answer. Please, write this in README. The very first sentence of the current README ("Ruby wrapper for libcmark") is wrong. If you need precise wording, you may take this:
--- README.md 2017-10-13 14:03:56.789326051 +0300
+++ R 2017-10-13 14:07:27.646749515 +0300
@@ -2,8 +2,8 @@
[![Build Status](https://travis-ci.org/gjtorikian/commonmarker.svg)](https://travis-ci.org/gjtorikian/commonmarker) [![Gem Version](https://badge.fury.io/rb/commonmarker.svg)](http://badge.fury.io/rb/commonmarker)
-Ruby wrapper for [libcmark](https://github.com/jgm/CommonMark),
-the reference parser for CommonMark. It passes all of the C tests, and is therefore spec-complete. It also provides unique extensions to the CommonMark spec, such as support for tables, strikethroughs, and autolinking.
+Ruby wrapper for [Github's fork of libcmark](https://github.com/github/cmark),
+the reference parser for CommonMark. It passes all of the C tests, and is therefore spec-complete. It also provides unique extensions to the CommonMark spec (using code from Github's fork of libcmark), such as support for tables, strikethroughs, and autolinking.
For more information on available extensions, see [the documentation below](#extensions).
https://github.com/github/markup/blob/master/lib/github/markup/markdown.rb contains this:
What are this
:tagfilter, :autolink, :table, :strikethrough
? Extensions? Why they are not documented? I tried togrep
sources forstrikethrough
, but I didn't find any documentation. If you don't want to document them, then at least please state its existence. Say in README that there is such thing as extension and one can pass list of extensions as a third argument toCommonMarker.render_html
.Also, it seems that libcmark doesn't support this extensions. So, this means that commonmarker is not simple wrapper for libcmark, commonmarker add significant additions to libcmark. So, this means that very first sentence of README is wrong (i. e. "Ruby wrapper for libcmark, the reference parser for CommonMark"). You should write instead that commonmarker is, say, "wrapper with extensions".