-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add list markup support #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e3b5714
to
5966cd2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds full support for list markup in the Typst-to-Textlint AST conversion, updates fixtures to reflect sorted keys and new list node shapes, and introduces integration tests for enforcing no trailing periods in list items.
- Introduce a
sortJsonKeys
helper to produce consistent, alphabetically sorted fixture outputs. - Update dozens of fixture files to reflect new list AST nodes and sorted JSON keys.
- Add integration tests and dependency for
textlint-rule-period-in-list-item
.
Reviewed Changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
test/unit/update-fixtures.ts | Added sortJsonKeys to normalize AST outputs before writing JSON |
test/unit/**/*.json (fixtures & AST dumps) | Regenerated fixtures with sorted keys and updated list node ranges |
test/unit/fixtures/*/input.typ | Added new list-containing fixtures (nested lists, paragraphs) |
test/integration/linting.test.ts | Imported and configured textlint-rule-period-in-list-item tests |
test/integration/fixtures/.../main.typ | New smoke fixtures for list-item period rule |
package.json | Added textlint-rule-period-in-list-item to dependencies |
Comments suppressed due to low confidence (2)
test/integration/linting.test.ts:10
- [nitpick] The aliases
textlintRulePresetJaTechnicalWritingRules
andtextlintRulePresetJaTechnicalWritingRulesConfig
are quite verbose. Consider using shorter, descriptive names likejaRules
andjaConfig
for readability.
import {
test/unit/update-fixtures.ts:13
- [nitpick] Consider extracting
sortJsonKeys
into a shared test utilities module so that it can be reused across test files and reduce duplication.
const sortJsonKeys = (obj: any): any => {
close #14