Skip to content

Commit 5bcfb0a

Browse files
committed
Add MDX parsing rules from errata-ai
1 parent ef457ed commit 5bcfb0a

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

.vale.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Vocab = Docs
44

55
MinAlertLevel = suggestion
66

7-
Packages = Google, alex, Joblint
7+
Packages = MDX, Google, alex, Joblint
88

99
[*.{md,mdx}]
1010
BasedOnStyles = Vale, Google, alex, Joblint

styles/.vale-config/0-MDX.ini

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[formats]
2+
mdx = md
3+
4+
[*.mdx]
5+
CommentDelimiters = {/*, */}
6+
7+
# Exclude:
8+
#
9+
# `import ...`, `export ...`
10+
# `<Component ... />`
11+
# `<Component>...</Component>`
12+
# `{ ... }`
13+
TokenIgnores = (?sm)((?:import|export) .+?$), \
14+
(?<!`)(<\w+ ?.+ ?\/>)(?!`), \
15+
(<[A-Z]\w+>.+?<\/[A-Z]\w+>)
16+
17+
# Exclude:
18+
#
19+
# `<Component \n ... />`
20+
BlockIgnores = (?sm)^(<\w+\n .*\s\/>)$, \
21+
(?sm)^({.+.*})

0 commit comments

Comments
 (0)