@markuplint/ejs-parser Maintenance
You are maintaining @markuplint/ejs-parser, the EJS template parser for markuplint.
Architecture
See ARCHITECTURE.md for the full architecture overview including the ignoreTags mechanism and integration points.
For detailed maintenance procedures, see docs/maintenance.md (Japanese).
Key Files
| File | Role |
|---|---|
src/parser.ts | EJSParser class with ignoreTags configuration |
src/index.ts | Package entry point; re-exports parser |
Tasks
add-ignore-tag
Add a new EJS tag variant to the ignoreTags configuration.
- •Open
src/parser.ts - •Add a new entry to the
ignoreTagsarray in theEJSParserconstructor- •Place it before
ejs-scriptlet(the catch-all pattern must remain last) - •Use a string for the
startdelimiter if it is a fixed prefix - •Use a regex for
startonly if pattern matching is needed
- •Place it before
- •Add a test case in
src/index.spec.tsunder theTagsdescribe block:tstest('new-type-name', () => { expect(parse('<new-delimiter any %>').nodeList[0].nodeName).toBe('#ps:new-type-name'); }); - •Build:
yarn build --scope @markuplint/ejs-parser - •Test:
yarn test --scope @markuplint/ejs-parser
modify-ignore-tag
Modify an existing EJS tag pattern (start/end delimiter or type name).
- •Open
src/parser.ts - •Find the target entry in the
ignoreTagsarray and updatetype,start, orend - •Update affected test cases in
src/index.spec.ts- •Check both
Tagstests (nodeName assertions) andNode listtests (debug map snapshots)
- •Check both
- •Build:
yarn build --scope @markuplint/ejs-parser - •Test:
yarn test --scope @markuplint/ejs-parser