Skip to content

Commit f5d3554

Browse files
seifferthmarijnh
authored andcommitted
[yaml-frontmatter mode] Allow pandoc-style closing with ...
This allows to end yaml-frontmatters with either `---` or `...`, as suggested [on the discussion board][1]. The old behaviour was to just accept `---`. [1]: https://discuss.codemirror.net/t/pandoc-markdown-style-yaml-frontmatter/2182
1 parent 558eb5a commit f5d3554

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mode/yaml-frontmatter/yaml-frontmatter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
return innerMode.token(stream, state.inner)
4646
}
4747
} else if (state.state == FRONTMATTER) {
48-
var end = stream.sol() && stream.match(/---/, false)
48+
var end = stream.sol() && stream.match(/(---|\.\.\.)/, false)
4949
var style = yamlMode.token(stream, state.inner)
5050
if (end) {
5151
state.state = BODY

0 commit comments

Comments
 (0)