File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @node-core/remark-lint" ,
33 "type" : " module" ,
4- "version" : " 1.2.0 " ,
4+ "version" : " 1.2.1 " ,
55 "exports" : {
66 "." : " ./src/index.mjs" ,
77 "./api" : " ./src/api.mjs"
Original file line number Diff line number Diff line change @@ -26,6 +26,11 @@ const testCases = [
2626 'Type reference should be separated by "|", without spaces; saw "{string | boolean}"' ,
2727 ] ,
2828 } ,
29+ {
30+ name : 'newline, multiple references' ,
31+ input : 'Psst, are you a {string|\nboolean}' ,
32+ expected : [ ] ,
33+ } ,
2934 {
3035 name : 'invalid references' ,
3136 input : 'This is {invalid}.' ,
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ import createQueries from '@nodejs/doc-kit/src/utils/queries/index.mjs';
33import { lintRule } from 'unified-lint-rule' ;
44import { visit } from 'unist-util-visit' ;
55
6- const MATCH_RE = / \s \| | \| \s / g;
7- const REPLACE_RE = / \s * \| \s * / g;
6+ const MATCH_RE = / \s \| | \| / g;
7+ const REPLACE_RE = / \s * \| * / g;
88
99/**
1010 * Ensures that all type references are valid
You can’t perform that action at this time.
0 commit comments