All contributions

thephpleague/commonmark

League CommonMark

An extensible PHP Markdown parser that fully supports the CommonMark and GitHub Flavored Markdown specs.

Language
PHP
GitHub stars
2,981
Merged changes
1
Project site
commonmark.thephpleague.com

What we changed

InlinesOnlyExtension accepts the unordered_list_markers option instead of rejecting a valid configuration with a validation error.

What this work shows

  • Config schemas with Nette Schema
  • A Markdown parser's extension system
  • PHPUnit functional tests
What was broken

A valid option ended in an exception

The unordered_list_markers option belongs to the shared commonmark config namespace. InlinesOnlyExtension registered a schema for that namespace without it, so setting the option threw a ValidationException saying Unexpected item.

How we fixed it

The option declared in the extension's schema

InlinesOnlyExtension declares unordered_list_markers with the same definition as CommonMarkCoreExtension. Rendering is unchanged, since this extension renders no lists, and a test checks that the option is accepted and *foo* still gives <em>foo</em>.

#1151

Merged change 1

  1. #1151 fix: accept unordered_list_markers config in InlinesOnlyExtension Merged 7 September 2026

What it taught us

When two extensions register a schema for the same config namespace, each has to know all its options, or switching extensions breaks a working configuration. We can spot such gaps in Nette schemas and cover them with a test.

More about this technology: PHP

Other projects we write code for

Describe your project.

A free quote comes back within an hour during working hours.