-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Support for GitLab Flavored Markdown #3977
Comments
Pandoc 2 introduced a new name for the Github flavored mark down: gfm There is PR/MR right now to switch over to Githubs version of common mark. It would be great if gitlab could provide what is different from the github spec so support could be added to pandadoc. https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14835#note_45257014
|
Regarding task lists: there's now a lua task-list filter which should do the job. |
GitLab might also switch over to a CommonMark-compliant variant, see https://gitlab.com/gitlab-org/gitlab-ce/issues/30087 |
You can follow the process of the switch to CommonMark in this issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/43011 |
This lua filter may be of interest regarding GitLab's math format. |
Gitlab made the switch to a commonmark-based variant, so the list in the first comment of this issue may not be accurate any more. |
Am closing this issue as gitlab now used CommonMark |
I still think a dedicated output format for GitLab Flavoured Markdown (I'll call it GLFM since GFM is already occupied) would be very useful. Currently it doesn't seem possible to accommodate GLFM by just combining Pandoc extensions because You currently can't combine |
@j9ac9k I would agree this issue should not be closed, Gitlab's implementation is based on CommonMark for some of the things that could otherwise be ambiguous, but it has lots of things added in after that. Neither commonmark nor gfm are replacements for what glfm does in practice. |
When/if we integrate commonmark-hs as pandoc's commonmark reader, it will be possible to be more flexible with extensions, and at that point we could add some GitLab ones. |
Can I help on this item? I don't know Haskell but I can produce a list of currently unsupported markup (according to gitlab documentation) and expected result. |
@koocotte If you post a task list of the currently unsupported markup in the issue, I'll update the original post to reflect the contents. |
Just for clarification, |
Not sure if this will help anyone, but I've been trying to scrape a full setup that closely emulates gitlab markdown, and I came up with this. It's pretty jankey, but it's more meant to be shoved into CI/CD setups than run on your own machine. |
I believe this is mostly solved by the switch to @jgm's new commonmark parser, which allows to choose from a large number of Markdown extensions. The remaining issues seems to be the unsupported math syntax, as well as a possible format shorthand like |
Just for reference: I've written a custom R Markdown format for GLFM some time ago: Basically, I call Pandoc with the following arguments:
The caveats regarding GFLM syntax unsupported by the above are documented here. |
I created a blog post comparing Gitlab and GitHub’s markdown syntax: http://www.yashsingh.us/blog/post/gitlab-markdown-vs-github-markdown.md |
GitLab also supports some very useful table formats which enable sorting and filtering of tables: |
Issue opened for a feature request for pandoc to support gitlab flavored markdown.
Language specifics can be found here: https://docs.gitlab.com/ee/user/markdown.html
This feature request comes from this post on the mailing list:
https://groups.google.com/forum/#!msg/pandoc-discuss/MWtpZMW_n70/BMvIOmG8AAAJ
Pandoc has extensions for:
Not supported:
multiline blockquote
inline diff
special gitlab references
task lists
videos
special gitlab references
gitlab's special format for specifying math:
The text was updated successfully, but these errors were encountered: