Add DocLang writer, consolidate shared utilities#11705
Draft
bitkojine wants to merge 2 commits into
Draft
Conversation
…ties Breaking: the XML format (1:1 equivalent of native/json) has been removed. Use -t native or -t json instead. Added: - DocLang writer (-t doclang) - AI-native document format, 205 lines - isSimpleContent utility in Writers.Shared - HTML reader CI fix (unused variable) Removed: - XML reader/writer/XMLFormat/tests/doc/schemas (-3,466 lines) Net: -2,340 lines. All 3,943 tests pass.
Owner
|
No, we won't be removing the xml format... |
Reverts the XML format removal from the previous v4.0 commit while
keeping all DocLang additions intact:
Restored deleted files:
- doc/xml.md, Readers/XML.hs, Writers/XML.hs, XMLFormat.hs
- Tests/XML.hs, tools/pandoc-xml.{dtd,rnc,rng,xsd}
Reverted XML-removal modifications in:
- Readers.hs, Writers.hs, test-pandoc.hs (XML refs restored)
- pandoc.cabal (XML modules + DocLang module)
- MANUAL.txt (XML output format + doclang format)
DocLang additions preserved:
- Writers/DocLang.hs, template, test files
- isSimpleContent in Writers/Shared.hs
- Extensions.hs entry, Tests/Old.hs entry
Owner
|
DocLang seems very new (just a few weeks). If it gets some traction then it could be a worthy addition to pandoc, but I think it's premature to add it now. |
Contributor
Author
|
Yes, I agree it’s probably a bit early to merge. I mainly wanted to get the PR ready and explore what Pandoc can do in DocLang pipelines. For now, I’m happy to keep it on my Pandoc fork and revisit it if DocLang gains traction. |
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.
Summary
Adds the DocLang writer (
-t doclang) — a new output format that converts any pandoc-supported document to the DocLang AI-native document format. DocLang is an open standard under LF AI & Data Foundation, backed by IBM, NVIDIA, Red Hat, and ABBYY.Also adds
isSimpleContentutility inText.Pandoc.Writers.Shared— detects single-paragraph inline content for container optimizations (virtual text, simple list items, etc.), available for all writers.Added
src/Text/Pandoc/Writers/DocLang.hs)data/templates/default.doclang)test/writer.doclang,test/tables.doclang)isSimpleContentutility inText.Pandoc.Writers.Sharedpandoc.cabal,Writers.hs,MANUAL.txtVerifying