Questions tagged [commonmark]

A strongly specified, highly compatible implementation of Markdown

A standardized, strongly specified, highly compatible implementation of Markdown.


Resources

Introduction

Specifications

54 questions
2
votes
2 answers

Unable to render HTML from Markdown

I am going through an online course on Laravel. This course is using the League\commonmark package for converting markdown to html. Whenever the package is used in the app, I get: Unable to find corresponding renderer for block type…
Roger Creasy
  • 1,419
  • 2
  • 19
  • 35
2
votes
0 answers

Error occurs in inline parsing — so it always throws a CommonMarkException was unhandled by user code in CommonMarkConverter.cs

My line endings settings are in Windows (CR/LF), but every time I try to view the saved markdown document, I get a commonmarkexception in commommarkconverter.cs. It told me that there was an error during in-line parsing. Maybe what is wrong is in…
JPaulPunzalan
  • 417
  • 1
  • 6
  • 20
1
vote
1 answer

How can I generate documentation from markdown with double bracket references to other markdown [Obsidian, Sphinx]?

I have an Obsidian vault in version control with a bunch of documentation of my project. These documents have double bracket references to other documents, like: For more information, see [[Roadmap.md]]. I'd like my documentation hosted and…
Toby Manders
  • 47
  • 1
  • 6
1
vote
1 answer

How to add id to headers in markdown commonmark php

I am using the laravel markdown extension https://github.com/GrahamCampbell/Laravel-Markdown It is a wrapper for https://github.com/thephpleague/commonmark Does anyone know what this would be called, or how do I enable the ability to add ids…
Jakub
  • 1,260
  • 1
  • 13
  • 40
1
vote
2 answers

Symfony League CommonMarkdown customize ExternalLinksExtension

How is the correct way to customize the ExternalLinksExtension in the services.yml on Symfony 4/5/6.1? according to official documentation ExternalLinksExtension it is assumed that the configuration parameters must be passed to the Enviroment.…
quetzalfir
  • 528
  • 7
  • 22
1
vote
1 answer

Keep custom code block attributes in pandoc when converting to Markdown

I am converting an org file to Markdown (specifically commonmark). I am adding a custom attribute to my code blocks, which the commonmark writer does not support, and strips them from the code block during conversion. I am trying to find a way to…
harabat
  • 127
  • 2
  • 5
1
vote
4 answers

PHP League Commonmark $environment error in Laravel cached view

After upgrading a Laravel project to PHP8 I'm getting this error pretty often: Passing an $environment into the "League\CommonMark\CommonMarkConverter" constructor is deprecated in 1.6 and will not be supported in 2.0; use MarkdownConverter…
eskimo
  • 2,421
  • 5
  • 45
  • 81
1
vote
3 answers

Sphinx adds Headings from Markdown File to Document Structure

I have configured Sphinx to use markdown files. In my index.rst file I have .. toctree:: :maxdepth: 2 :caption: Contents: documents/Markdown In Markdown.md I have # Markdown ## H2 Heading When I render the main page I get the H2…
Mr. J
  • 1,524
  • 2
  • 19
  • 42
1
vote
0 answers

common mark / vscode table of contents not working

I'm using the current version visual studio code and extensions Markdown All in One, Markdown Paste, markdownlint, and Markdown+Math. in markdown I write: ## Table of Contents 1. [heading](##heading%201) 2. [heading](##heading%202) ## heading…
Hugh Gasse
  • 11
  • 3
1
vote
1 answer

Parsedown: sub/superscript

The current version of Parsedown 1.8.0-beta-5 doesn't have a builtin syntax for sub/superscript. Although CommonMark doesn't specify such syntax, several other lightweight markup languages (ex: Parsedown Extreme, Textile) use a syntax similar to the…
Mark Messa
  • 440
  • 4
  • 22
1
vote
1 answer

Converting from docx to markdown how to get rid of span underline in links?

Since a recent pandoc update (now I'm at 2.2.1) the links in a docx document are converted to [graphic novel hero](https://www.amazon.com/exec/obidos/ASIN/1596432594/braipick-20) adding a unneeded span to link labels.…
SiliconValley
  • 1,465
  • 17
  • 30
1
vote
1 answer

How to load commonmark.js in a local HTML file?

I was following the steps and wrote a demo HTML. Here are the steps in the README of https://github.com/commonmark/commonmark.js#commonmarkjs : For client-side use, you can do make dist to produce a standalone JavaScript file…
Lone Learner
  • 18,088
  • 20
  • 102
  • 200
1
vote
0 answers

CommonMark Markdown Inline parser always return inside `

` tag

i am using League's CommonMark package, and create custom extension to show tag using custom tag markdown like this: @image(image_id). In markdown is: @image(image_id) Result i expected:
Muh Ghazali Akbar
  • 1,169
  • 3
  • 13
  • 21
1
vote
1 answer

Commonmark for Java - I want to render without paragraphs?

I'm using the Atlassian Commonmark API found here to parse Markdown to HTML. Works beautifully, but tends to add to the beginning and end of every parsed String. Has anyone used the API extensively in the past and/or has any idea how I…
BlueTooth4269
  • 113
  • 3
  • 14
1
vote
1 answer

How to parse nested containers with Commonmark for PHP?

I am attempting to create a spoiler block using League’s CommonMark package. The block is opened by three inverted exclamation marks, optionally followed by a summary; three normal exclamation marks conclude the block. This is the code I have so…
Jan Tojnar
  • 5,306
  • 3
  • 29
  • 49