Skip to content

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

Merged
merged 12 commits into from
Jun 10, 2025
Merged

feat: add list markup support #18

merged 12 commits into from
Jun 10, 2025

Conversation

3w36zj6
Copy link
Member

@3w36zj6 3w36zj6 commented Jun 1, 2025

close #14

@3w36zj6 3w36zj6 requested a review from Copilot June 1, 2025 16:39
Copilot

This comment was marked as outdated.

@3w36zj6 3w36zj6 force-pushed the feature/add-list-support branch 2 times, most recently from e3b5714 to 5966cd2 Compare June 1, 2025 16:46
@3w36zj6 3w36zj6 requested a review from Copilot June 10, 2025 07:19
Copy link

@Copilot Copilot AI left a 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 and textlintRulePresetJaTechnicalWritingRulesConfig are quite verbose. Consider using shorter, descriptive names like jaRules and jaConfig 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 => {

@3w36zj6 3w36zj6 merged commit 22a3562 into main Jun 10, 2025
4 checks passed
@3w36zj6 3w36zj6 deleted the feature/add-list-support branch June 10, 2025 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ListItem markup support
1 participant