fix(docx-import): map List Paragraph style to BBX list type#126
Merged
Conversation
Added a Pandoc Lua pre-filter to convert custom-style List Paragraph/Paragraph List blocks into real list blocks before BBX conversion. Sorry but I had to add another lua file. If I did not it would not catch the list before it was removed from the paragraphs and it only needed to work with docx. This might be another good reason to try to go all native. I will start looking into that. This should work for now though. This bug came from my PNC files. It is rare but Now that I have this I have one more thing to do before I can replace duxbery in the PNC code. Since this was only for my special list paragraph style I made it for DOCX import execution to apply the new filter only for DOCX inputs.eserved BBX output compatibility by keeping list conversion in the existing Pandoc/BBX pipeline. Fixed the tests so they supported the extra lua file.
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.
Added a Pandoc Lua pre-filter to convert custom-style List Paragraph/Paragraph List blocks into real list blocks before BBX conversion.
Sorry but I had to add another lua file. If I did not it would not catch the list before it was removed from the paragraphs and it only needed to work with docx.
after looking at this I think what I am doing
in this might help with changing to native pandoc later.
I will start looking into that. This works for now though.
This bug came from my PNC files. It is rare but Now that I have this I have one more thing to do before I can replace duxbery in the PNC code.
Since this was only for my special list paragraph style I made it for DOCX import execution to apply the new filter only for DOCX inputs.eserved BBX output compatibility by keeping list conversion in the existing Pandoc/BBX pipeline.
Other users may find this useful since the listparagraph style is used out in the real world in word.
If other styles are found the additions I made will make them easier to add. Maybe even small caps and subscripts
Fixed the tests so they supported the extra lua file.