Skip to content

feat(code): Add support for document context - #16

Open
mOctave wants to merge 9 commits into
mainfrom
feat-documents
Open

mOctave wants to merge 9 commits into
mainfrom
feat-documents

Conversation

@mOctave

@mOctave mOctave commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Feature

This PR addresses the issue/bug described in issue #9.

Checklist

  • I have read and understand the Contributing Guidelines.
  • I accept the terms of the AGPL-3-or-later license of this project, and recognize that, if and when this pull request is merged, I relinquish individual ownership of my work.
  • I did not use generative AI to write any code or create any other part of this PR.

For code PRs only:

  • I have tested any code I've added, and added unit tests where needed
  • I have added Javadoc comments / Python docstrings to all my new code.
  • I have either updated the copyright header of all files I've made significant changes to, or waive my copyright. -- todo, get the date ranges right

Summary

This PR introduces an alternative method of parsing nodes, that preserves the original context (and most of the original formatting) of the document they were parsed from so they can be properly written back out to the same file(s) later.

Usage examples

Honestly, just read the codebase for now. I'll add proper documentation before merging this.

Testing

Lots of unit tests for the smaller components, the whole Document class is kinda just covered by three integration tests right now. More tests should be written before merging this.

Performance Impact

Makes the library bigger and adds an optional worse-performance way to do things without hurting the performance of the original approach. Not a big issue.

@mOctave mOctave linked an issue Oct 19, 2026 that may be closed by this pull request

This branch has not been deployed

No deployments
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.

(Feat) Add support for parsing full lines instead of just nodes

1 participant