Skip to content
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

Refactor text formats modules #2060

Merged
merged 10 commits into from
Oct 22, 2024
Merged

Refactor text formats modules #2060

merged 10 commits into from
Oct 22, 2024

Conversation

vkbo
Copy link
Owner

@vkbo vkbo commented Oct 21, 2024

Summary:

As the output formats code growing in scope, a refactoring is needed. This PR helps keeping the block and text formats apart from the classes by moving them to enums, rename some variables to be more consistent with current use, and reorganises some shared code.

Processing changes:

  • Handling of justified text has been moved from the format classes to the Tokenizer, so that it is now applied consistently between formats.
  • Handling of Comments, Tags and References are now all in the Tokenizer, outputting a regular text paragraph with all special formatting set.
  • Theme colours are handled from one single settings class and applied to each formatted document. They should now all look like the preview.

Related Issue(s):

Reviewer's Checklist:

  • The header of all files contain a reference to the repository license
  • The overall test coverage is increased or remains the same as before
  • All tests are passing
  • All flake8 checks are passing and the style guide is followed
  • Documentation (as docstrings) is complete and understandable
  • Only files that have been actively changed are committed

@vkbo vkbo added this to the Release 2.6 Beta 1 milestone Oct 21, 2024
@vkbo vkbo merged commit fe63770 into main Oct 22, 2024
9 checks passed
@vkbo vkbo deleted the refactor_formats branch October 22, 2024 19:51
@vkbo vkbo mentioned this pull request Oct 23, 2024
6 tasks
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.

1 participant