Skip to content

Commit 609fe28

Browse files
committed
Allow declarations with no space, as per spec
See commonmark/cmark@b1d961c
1 parent ff2ccaf commit 609fe28

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Updates should follow the [Keep a CHANGELOG](https://keepachangelog.com/) princi
66

77
## [Unreleased][unreleased]
88

9+
### Fixed
10+
11+
- Fixed declaration parser being too strict
12+
913
## [2.4.1] - 2023-08-30
1014

1115
### Fixed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"require-dev": {
3232
"ext-json": "*",
3333
"cebe/markdown": "^1.0",
34-
"commonmark/cmark": "0.30.0",
34+
"commonmark/cmark": "0.30.3",
3535
"commonmark/commonmark.js": "0.30.0",
3636
"composer/package-versions-deprecated": "^1.8",
3737
"embed/embed": "^4.4",
@@ -67,9 +67,9 @@
6767
"type": "package",
6868
"package": {
6969
"name": "commonmark/cmark",
70-
"version": "0.30.0",
70+
"version": "0.30.3",
7171
"dist": {
72-
"url": "https://github.com/commonmark/cmark/archive/0.30.0.zip",
72+
"url": "https://github.com/commonmark/cmark/archive/0.30.3.zip",
7373
"type": "zip"
7474
}
7575
}

src/Util/RegexHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ final class RegexHelper
5555
public const PARTIAL_CLOSEBLOCKTAG = '<\/' . self::PARTIAL_BLOCKTAGNAME . '\s*[>]';
5656
public const PARTIAL_HTMLCOMMENT = '<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->';
5757
public const PARTIAL_PROCESSINGINSTRUCTION = '[<][?][\s\S]*?[?][>]';
58-
public const PARTIAL_DECLARATION = '<![A-Z]+' . '\s+[^>]*>';
58+
public const PARTIAL_DECLARATION = '<![A-Z]+' . '[^>]*>';
5959
public const PARTIAL_CDATA = '<!\[CDATA\[[\s\S]*?]\]>';
6060
public const PARTIAL_HTMLTAG = '(?:' . self::PARTIAL_OPENTAG . '|' . self::PARTIAL_CLOSETAG . '|' . self::PARTIAL_HTMLCOMMENT . '|' .
6161
self::PARTIAL_PROCESSINGINSTRUCTION . '|' . self::PARTIAL_DECLARATION . '|' . self::PARTIAL_CDATA . ')';

0 commit comments

Comments
 (0)