@markuplint/parser-utils 4.0.0-alpha.10 → 4.0.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/debug.d.ts +4 -0
- package/lib/debug.js +6 -0
- package/lib/parser.js +2 -0
- package/lib/script-parser.d.ts +0 -1
- package/lib/script-parser.js +0 -10
- package/package.json +6 -5
package/lib/debug.d.ts
ADDED
package/lib/debug.js
ADDED
package/lib/parser.js
CHANGED
|
@@ -14,6 +14,7 @@ import { isVoidElement as detectVoidElement } from '@markuplint/ml-spec';
|
|
|
14
14
|
import { v4 as uuid } from 'uuid';
|
|
15
15
|
import { attrTokenizer } from './attr-tokenizer.js';
|
|
16
16
|
import { defaultSpaces } from './const.js';
|
|
17
|
+
import { domLog } from './debug.js';
|
|
17
18
|
import { detectElementType } from './detect-element-type.js';
|
|
18
19
|
import { AttrState, TagState } from './enums.js';
|
|
19
20
|
import { getCol, getEndCol, getEndLine, getLine } from './get-location.js';
|
|
@@ -140,6 +141,7 @@ export class Parser {
|
|
|
140
141
|
}
|
|
141
142
|
nodeList = [fmNode, ...newNodeList];
|
|
142
143
|
}
|
|
144
|
+
domLog(nodeList);
|
|
143
145
|
__classPrivateFieldGet(this, _Parser_instances, "m", _Parser_reset).call(this);
|
|
144
146
|
return {
|
|
145
147
|
raw: rawCode,
|
package/lib/script-parser.d.ts
CHANGED
package/lib/script-parser.js
CHANGED
|
@@ -10,13 +10,3 @@ export function scriptParser(script) {
|
|
|
10
10
|
value: token.value,
|
|
11
11
|
}));
|
|
12
12
|
}
|
|
13
|
-
export function removeQuote(str) {
|
|
14
|
-
const quote = str[0];
|
|
15
|
-
if (quote !== '"' && quote !== "'" && quote !== '`') {
|
|
16
|
-
return str;
|
|
17
|
-
}
|
|
18
|
-
if (str.at(-1) !== quote) {
|
|
19
|
-
return str;
|
|
20
|
-
}
|
|
21
|
-
return str.slice(1, -1);
|
|
22
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markuplint/parser-utils",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.11",
|
|
4
4
|
"description": "Utility module for markuplint parser plugin",
|
|
5
5
|
"repository": "git@github.com:markuplint/markuplint.git",
|
|
6
6
|
"author": "Yusuke Hirao <yusukehirao@me.com>",
|
|
@@ -27,13 +27,14 @@
|
|
|
27
27
|
"clean": "tsc --build --clean"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@markuplint/ml-ast": "4.0.0-alpha.
|
|
31
|
-
"@markuplint/ml-spec": "4.0.0-alpha.
|
|
32
|
-
"@markuplint/types": "4.0.0-alpha.
|
|
30
|
+
"@markuplint/ml-ast": "4.0.0-alpha.11",
|
|
31
|
+
"@markuplint/ml-spec": "4.0.0-alpha.11",
|
|
32
|
+
"@markuplint/types": "4.0.0-alpha.11",
|
|
33
33
|
"@types/uuid": "^9.0.8",
|
|
34
|
+
"debug": "^4.3.4",
|
|
34
35
|
"espree": "^10.0.0",
|
|
35
36
|
"type-fest": "^4.10.1",
|
|
36
37
|
"uuid": "^9.0.1"
|
|
37
38
|
},
|
|
38
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "78ab1adaa4e178b4187f6c5f135bb8fc0c8f4b9e"
|
|
39
40
|
}
|