@markuplint/astro-parser 4.0.2 → 4.1.1
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/astro-parser.d.ts.map +1 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/parser.d.ts +9 -0
- package/lib/parser.d.ts.map +1 -0
- package/lib/parser.js +11 -0
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"astro-parser.d.ts","sourceRoot":"","sources":["../src/astro-parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAKxD,YAAY,EACX,QAAQ,EACR,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,IAAI,GACJ,MAAM,yBAAyB,CAAC;AAEjC,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAYjD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC"}
|
package/lib/parser.d.ts
CHANGED
|
@@ -46,6 +46,15 @@ declare class AstroParser extends Parser<Node, State> {
|
|
|
46
46
|
endCol: number;
|
|
47
47
|
__rightText?: string | undefined;
|
|
48
48
|
};
|
|
49
|
+
/**
|
|
50
|
+
* > Variable names must be capitalized. For example, use `Element`, not `element`.
|
|
51
|
+
* > Otherwise, Astro will try to render your variable name as a literal HTML tag.
|
|
52
|
+
*
|
|
53
|
+
* @see https://docs.astro.build/en/basics/astro-syntax/#dynamic-html
|
|
54
|
+
* @param nodeName
|
|
55
|
+
* @param defaultPattern
|
|
56
|
+
*/
|
|
57
|
+
detectElementType(nodeName: string): import("@markuplint/ml-ast").ElementType;
|
|
49
58
|
}
|
|
50
59
|
export declare const parser: AstroParser;
|
|
51
60
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAa,MAAM,EAAe,MAAM,0BAA0B,CAAC;AAI1E,KAAK,KAAK,GAAG;IACZ,OAAO,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,cAAM,WAAY,SAAQ,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC;;;IAc5C,QAAQ;;;;IAOR,OAAO,CAEN,UAAU,EAAE,IAAI,EAChB,UAAU,EAAE,eAAe,GAAG,IAAI,EAClC,KAAK,EAAE,MAAM;IAsHd,iBAAiB,CAAC,QAAQ,EAAE,SAAS,iBAAiB,EAAE;IAMxD,YAAY,CACX,KAAK,EAAE,UAAU,EAEjB,UAAU,EAAE,SAAS,IAAI,EAAE,GACzB,SAAS,iBAAiB,EAAE;IA6B/B,aAAa,CAEZ,QAAQ,EAAE,SAAS,IAAI,EAAE,EACzB,UAAU,EAAE,eAAe,GAAG,IAAI,GAChC,KAAK,EAAE;IAQV,SAAS,CAAC,KAAK,EAAE,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2DtB;;;;;;;OAOG;IACH,iBAAiB,CAAC,QAAQ,EAAE,MAAM;CAqBlC;AAED,eAAO,MAAM,MAAM,aAAoB,CAAC"}
|
package/lib/parser.js
CHANGED
|
@@ -207,6 +207,17 @@ class AstroParser extends Parser {
|
|
|
207
207
|
potentialName,
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
|
+
/**
|
|
211
|
+
* > Variable names must be capitalized. For example, use `Element`, not `element`.
|
|
212
|
+
* > Otherwise, Astro will try to render your variable name as a literal HTML tag.
|
|
213
|
+
*
|
|
214
|
+
* @see https://docs.astro.build/en/basics/astro-syntax/#dynamic-html
|
|
215
|
+
* @param nodeName
|
|
216
|
+
* @param defaultPattern
|
|
217
|
+
*/
|
|
218
|
+
detectElementType(nodeName) {
|
|
219
|
+
return super.detectElementType(nodeName, /^[A-Z]/);
|
|
220
|
+
}
|
|
210
221
|
}
|
|
211
222
|
_AstroParser_instances = new WeakSet(), _AstroParser_updateScopeNS = function _AstroParser_updateScopeNS(
|
|
212
223
|
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markuplint/astro-parser",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.1",
|
|
4
4
|
"description": "astro parser for markuplint",
|
|
5
5
|
"repository": "git@github.com:markuplint/markuplint.git",
|
|
6
6
|
"author": "Yusuke Hirao <yusukehirao@me.com>",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@markuplint/ml-ast": "4.0.1",
|
|
25
|
-
"@markuplint/parser-utils": "4.
|
|
25
|
+
"@markuplint/parser-utils": "4.1.1",
|
|
26
26
|
"astro-eslint-parser": "^0.16.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@astrojs/compiler": "^2.5.3"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "10ce6c8374106f311eeaaffbae8f3fdcbb40f877"
|
|
32
32
|
}
|