mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-30 18:27:00 +01:00
LibreOffice writes an unnumbered list entry as an item's second paragraph. The ODT reader joined it to the first with a line break, so a save could bring the file back with the wrong paragraphs, and a list header got a number. Such paragraphs are now read as paragraphs of their own, with no number, at the item's text indent, and marked with the new `ParaProps::list_item` (the flow model's `Para::item`). - HTML and Markdown export keep the paragraph in its item, so one numbered list continues across it. - Markdown `parse_list` joins a code block, quote or heading inside an item back to the item (also after a sublist), so it gets no number. - The writers keep a paragraph in its item only while it sits at the item's text indent, so text outdented to the margin leaves the list. - ODT written from the model puts a further paragraph inside its `text:list-item`. - A level first used after an unnumbered paragraph keeps the file's label. Ported from storytold/wordcraft#5723 after the readers and writers moved here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
633 B
TOML
21 lines
633 B
TOML
[package]
|
|
name = "craft-markdown"
|
|
description = "Markdown read and written: a CommonMark subset with GitHub tables and strikethrough, to and from the craft-flow model and a craft-wordmodel Document."
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version.workspace = true
|
|
repository.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
craft-flow = { workspace = true }
|
|
craft-html = { workspace = true }
|
|
craft-wordmodel = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
# A test writes imported Markdown to HTML, to check a list stays one there.
|
|
craft-html = { workspace = true, features = ["flow"] }
|