Update txt2tags, modify markdown conversion#30
Merged
Conversation
seanbudd
force-pushed
the
updateText2Tags
branch
from
December 21, 2023 02:30
4ea909a to
faa9465
Compare
5 tasks
michaelDCurran
previously approved these changes
Dec 21, 2023
seanbudd
force-pushed
the
updateText2Tags
branch
from
December 29, 2023 04:33
7bce256 to
e6bfff4
Compare
|
There seems to be an issue when viewing the generated It seems that some cell contents and spaces between |
michaelDCurran
approved these changes
Jan 4, 2024
seanbudd
added a commit
to nvaccess/nvda
that referenced
this pull request
Jan 9, 2024
Closes #8734 Part of #15014 Related nvaccess/nvda-misc-deps#30, #16002, #15950, #15939, #15981 Summary of the issue: In order to migrate to Crowdin, we must convert txt2tags to markdown. In order transition safely, beta will build docs from t2t to markdown to html. Eventually the t2t will be removed and the markdown will become the source of truth. Description of user facing changes The user Guide no longer has numbered sections Translators and documentation writers now use extended markdown syntax rather than txt2tags. Description of development approach The build system performs certain pre-processing and post-processing when converting t2t to HTML. This equivalent system should be retained - i.e. the translator and documentation contribution experience should remain the same for markdown to HTML. Additionally, when converting t2t to markdown, new processing rules had to be created. There is no universal standard for custom anchors in markdown. As such text2tags doesn't have default rules for this. To retain our custom anchors, I added rules for a common markdown extended syntax. Similarly a shortcut is used for generating table of contents. See nvaccess/nvda-misc-deps#30 Setting the language code is done using the user_docs folder name, and the direction of RTL is manually set for the 3 current languages that require it, Persian, Arabic, Hebrew. Special Catalan processing for adding hreflang attributes is converted to a markdown extension syntax of {hreflang=en} The key commands file is generated using a custom made markdown python extension.
Adriani90
pushed a commit
to Adriani90/nvda
that referenced
this pull request
Mar 13, 2024
Closes nvaccess#8734 Part of nvaccess#15014 Related nvaccess/nvda-misc-deps#30, nvaccess#16002, nvaccess#15950, nvaccess#15939, nvaccess#15981 Summary of the issue: In order to migrate to Crowdin, we must convert txt2tags to markdown. In order transition safely, beta will build docs from t2t to markdown to html. Eventually the t2t will be removed and the markdown will become the source of truth. Description of user facing changes The user Guide no longer has numbered sections Translators and documentation writers now use extended markdown syntax rather than txt2tags. Description of development approach The build system performs certain pre-processing and post-processing when converting t2t to HTML. This equivalent system should be retained - i.e. the translator and documentation contribution experience should remain the same for markdown to HTML. Additionally, when converting t2t to markdown, new processing rules had to be created. There is no universal standard for custom anchors in markdown. As such text2tags doesn't have default rules for this. To retain our custom anchors, I added rules for a common markdown extended syntax. Similarly a shortcut is used for generating table of contents. See nvaccess/nvda-misc-deps#30 Setting the language code is done using the user_docs folder name, and the direction of RTL is manually set for the 3 current languages that require it, Persian, Arabic, Hebrew. Special Catalan processing for adding hreflang attributes is converted to a markdown extension syntax of {hreflang=en} The key commands file is generated using a custom made markdown python extension.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates text2tags version 3.9.
This is to support converting t2t to markdown.
See also nvaccess/nvda#15945
It also applies a small patch updating the rules for markdown.
There is no universal standard for custom anchors in markdown.
As such text2tags doesn't have default rules for this. To retain our custom anchors, I added rules for a common markdown extended syntax. This is supported by the python markdown legacy attributes extension.
Similarly we use a custom syntax for autogenerating the Table of contents.
We also need to fix the markdown conversion so that the page title (first line of t2t file) has heading markup.
Numbered titles are also stripped in favour of numberless titles.