Skip to content

Commit 04a7039

Browse files
committed
fix: support non-expressions in {...}
1 parent bc79b15 commit 04a7039

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

internal/lint/adoc.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ func (l *Linter) lintADoc(f *core.File) error {
8989
}
9090

9191
func callAdoc(text, exe string, attrs map[string]string) (string, error) {
92-
adocArgs = append(adocArgs, parseAttributes(attrs)...)
93-
adocArgs = append(adocArgs, []string{"--safe-mode", "secure", "-"}...)
94-
return system.ExecuteWithInput(exe, text, adocArgs...)
92+
args := append(adocArgs, parseAttributes(attrs)...)
93+
args = append(args, []string{"--safe-mode", "secure", "-"}...)
94+
return system.ExecuteWithInput(exe, text, args...)
9595
}
9696

9797
func parseAttributes(attrs map[string]string) []string {

testdata/fixtures/formats/.vale.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ vale.Annotations = YES
99

1010
[*.xml]
1111
Transform = ../XSL/docbook-xsl-snapshot/html/docbook.xsl
12+
13+
[*.mdx]
14+
TokenIgnores = '({#[^\n}]+})'

testdata/fixtures/formats/test.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,9 @@ Two 🍰 is: {Math.PI * 2}, TODO
4646

4747
return <span style={{color: 'goldenrod'}}>Not me.</span>
4848
})()}
49+
50+
## Some Markdown {#initial-setup}
51+
52+
This is a paragraph with some **bold** text and a [link](https://example.com).
53+
54+
```js

0 commit comments

Comments
 (0)