Skip to content

feat: ensure text before and after list of terms are separate paragraphs#33

Merged
3w36zj6 merged 4 commits intomainfrom
feature/ensure-text-before-and-after-list-of-terms-are-separate-paragraphs
Jan 5, 2026
Merged

feat: ensure text before and after list of terms are separate paragraphs#33
3w36zj6 merged 4 commits intomainfrom
feature/ensure-text-before-and-after-list-of-terms-are-separate-paragraphs

Conversation

@3w36zj6
Copy link
Member

@3w36zj6 3w36zj6 commented Jan 5, 2026

close #32

Copy link

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 implements functionality to ensure that text before and after term lists (definition lists in Typst) are treated as separate paragraphs, addressing issue #32.

Key changes:

  • Added logic to detect and handle term items at the document root level, preventing them from being incorrectly grouped with surrounding text
  • Implemented splitting of paragraphs that contain mixed term items and regular text into separate paragraph and term item nodes
  • Added comprehensive test fixtures covering term lists with and without surrounding blank lines

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/typstToTextlintAst.ts Added splitParagraphTermlist function to split paragraphs containing term items, added collectConsecutiveRootTermItems function to collect consecutive term items at root level, and modified paragraph grouping logic to handle term items specially
test/unit/fixtures/paragraph-between-term-list/input.typ New test fixture input with term lists surrounded by paragraphs, both with and without blank lines
test/unit/fixtures/paragraph-between-term-list/output.json Expected AST output showing proper separation of paragraphs and term items
test/unit/fixtures/List/input.typ Extended existing list test to include term items after regular lists
test/unit/fixtures/List/output.json Updated expected output to include the new term items in the test

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@3w36zj6 3w36zj6 merged commit 6aad951 into main Jan 5, 2026
7 checks passed
@3w36zj6 3w36zj6 deleted the feature/ensure-text-before-and-after-list-of-terms-are-separate-paragraphs branch January 5, 2026 11:53
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.

Ensure text before and after list of terms are separate paragraphs

1 participant