jubarte-markdown
Markdown in and out of Word documents for the jubarte
DOCX engine. It writes CommonMark (with GitHub's tables, strikethrough, task
lists and footnotes) as a .docx, turning CriticMarkup into Word tracked
changes and comments; it reads a .docx back as the agent view's Markdown;
it diffs two texts as CriticMarkup; and it reads Word 97-2003 .doc files.
Where it sits
jubarte-dom → jubarte-opc → jubarte-redlines / jubarte-render →
jubarte-doc / jubarte-markdown / jubarte-edit → jubarte-cli → jubarte
jubarte-markdown sits on jubarte-dom, jubarte-opc, jubarte-redlines
and jubarte-doc, and on jubarte-render behind its render feature.
jubarte-edit builds on it and adds the patch, redline and unified views to
its markdown module.
When to use this crate
Depend on jubarte-markdown to generate Word documents from Markdown, to
read documents as Markdown for a model or a diff, or to read .doc files.
For Markdown patches applied as tracked changes, depend on jubarte-edit;
for everything, on the facade crate jubarte.
Install
or in Cargo.toml:
[]
= "0.20.0"
The jubarte crates are released together at one version and pin each other exactly, so depend on the same version of every jubarte crate you use. Minimum supported Rust version: 1.94.
Cargo features
None is on by default.
| Feature | What it adds |
|---|---|
render |
Page-aware reading through jubarte-render (and jubarte-doc/render): page_texts, with_page_markers, and page markers taken from the layout. Without it, page markers come from the document's explicit breaks. |
test-support |
Hidden helpers for jubarte's own tests; not a public API. |
Example
use list_changes;
use ;
Modules
markdown: Markdown to DOCX (markdown_to_docx,DocxOptions), DOCX to Markdown (docx_to_markdown,MarkdownOptions), anddiff_markdown.legacy_doc: Word 97-2003.docto text, paragraphs, headings, lists and tables (the main story).- Re-exported from the layers below:
changes,comments,validate,inspectanddebug(jubarte-doc);compareranddocument_comparer(jubarte-redlines);opc,admission,settingsandstrict_translation(jubarte-opc);xmllinq,namespaces,idsandutil(jubarte-dom).
License
Apache-2.0. NOTICE carries the attributions of the projects this code derives from.
Links
- API reference: docs.rs/jubarte-markdown
- Guide: jubarte-markdown on ReadTheDocs, part of the jubarte documentation
- Repository: github.com/jandira-tech/jubarte (this crate)
- Command line: the CLI reference of the root README
- Changes: CHANGELOG.md