Skip to content

Commit a991b9e

Browse files
committed
Add ABBREVIATION to NodeType for profile filtering
Abbreviations were not profilable because the type was missing from NodeType. Now they are: - Allowed in full and article profiles - Denied in comment and minimal profiles (via allowlist)
1 parent 7444d99 commit a991b9e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/NodeType.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,11 @@ final class NodeType
206206
*/
207207
public const MATH = 'math';
208208

209+
/**
210+
* @var string
211+
*/
212+
public const ABBREVIATION = 'abbreviation';
213+
209214
/**
210215
* @return list<string>
211216
*/
@@ -260,6 +265,7 @@ public static function allInlineTypes(): array
260265
self::DELETE,
261266
self::SYMBOL,
262267
self::MATH,
268+
self::ABBREVIATION,
263269
];
264270
}
265271
}

src/Profile.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ public static function comment(): self
179179
NodeType::SPAN => 'Custom spans are disabled in comments.',
180180
NodeType::SYMBOL => 'Symbol markup is disabled in comments.',
181181
NodeType::MATH => 'Math markup is disabled in comments.',
182+
NodeType::ABBREVIATION => 'Abbreviations are disabled in comments.',
182183
];
183184

184185
return $profile;
@@ -231,6 +232,7 @@ public static function minimal(): self
231232
NodeType::SPAN => 'Custom spans are disabled in this minimal context.',
232233
NodeType::SYMBOL => 'Symbols are disabled in this minimal context.',
233234
NodeType::MATH => 'Math is disabled in this minimal context.',
235+
NodeType::ABBREVIATION => 'Abbreviations are disabled in this minimal context.',
234236
'default' => 'Only basic text formatting and lists are allowed in this context.',
235237
];
236238

0 commit comments

Comments
 (0)