Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 63 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,60 @@ follow semantic versioning; release dates are ISO 8601.

### Public API

- **A DOCX export writes a paragraph the page reads as markdown as the page sets it.** A session
reads markdown unless it is told not to (`markdown(false)`). The page then sets a paragraph of
plain text holding a mark of emphasis or code: the text its marks style bold or italic, a
heading line bold — the first three levels larger — and the marks its parser reads dropped. The
export wrote the text as authored, so Word showed `**bold**` with its asterisks and none of the
bold, and the report named it.
- **The text is read as the page reads it** — line by line, through the page's own parser, a
list marker opening a line kept — and written as one run a piece, in the face, family, colour,
tracking and size the page sets it in: `**Java**` is a bold run reading `Java`, a heading line
bold at its larger size, a line break where the page starts a line. A linked paragraph's
pieces stay in one link, and Word's outline lists a heading by the text written. An
auto-sized paragraph's pieces are written at its style's size, a heading's at its multiple of
it, as its text was.
- **The page's own lines decide it.** The pieces are written only where the lines the page laid
the paragraph out in hold the pieces' letters in their faces, families, colours and tracking,
at their sizes to a hundredth of a point — or, where the page fits the text to a size of its
own, at sizes in the same proportion. A session that reads no markdown lays the marks out, and
the text is written as it stands, as before; so is text the parser changes nothing of, an
underscore inside a word.
- **The faces are the page's.** Where the session reads markdown, its parser sets every piece in
a face of its own and leaves the paragraph's aside: a bold paragraph's `Senior_Engineer`
stands regular on the page, and is written so.
- **Every path that writes a paragraph does it:** the body, a table cell, text over the flow,
the line an overlay's two sides share, a badge's initials and a page zone's line.
- A paragraph composed in a table cell is matched to its lines by its text as the page reads
it, where no line carries it as authored, and only to lines that set its pieces so.
- A badge's initials are counted as the page sets them: `**JR**` is now a badge's two bold
letters. Initials in two faces, `*J*R`, or a heading, are written in the flow, as initials
in two runs' faces are.
- **A heading written taller than its line is named.** The page sets a markdown heading in a
line as tall as the paragraph's own and draws its letters past it; written in that exact line,
Word cuts their tops on screen. An auto-sized paragraph's heading, written at a multiple of its
style's size, may fit the line the page fits the text to, and is named only where it does not.
- **The font table ships the faces the pieces of a paragraph outside table cells and page zones
are set in** — the paragraphs it reads. It is written before any paragraph, so it reads them
off the text: a session that reads no markdown ships a face it does not use.
- **Still written as authored, and named:**
- a paragraph whose lines are not read — with no layout, composed in a table cell whose text
no line of its table carries so, or a page zone's the layout shows none of — where the note
says whether the page reads its marks is not measured;
- one the page sets in other letters than its text, as Arabic, which the page shapes before it
reads the marks;
- text the parser reads into nothing, which the page sets as nothing and which went unnamed:
a lone `*`, an empty list item; `***`, a rule; a line set four spaces in, a block of code;
- a list's items, as before.
- **With no layout**, a paragraph is read line by line for the note too: a list marker opening
a line, `* a_b`, is no longer counted as a mark the page drops.

Across the DOCX fidelity corpus one document's bytes change: `TimelineMinimal`'s open-source
project line is written in regular Lato, where Word drew it bold, with `(Open source)` in italic
and without the asterisks, as the page sets it; the file ships Lato Italic for it, and the line's
note goes: 954 notes, from 955. The other 61 documents are byte-identical. `DocxMarkdown` reads
the pieces and compares them with the page's lines, with a unit test.

- **A DOCX page zone's text stands on the page's baseline.** A page zone is written as one line
of a Word header or footer. The line was Word's single line for its face. Its top sat at the
zone content's top in a header, and its foot at the content's foot in a footer. So the line's
Expand Down Expand Up @@ -142,9 +196,10 @@ follow semantic versioning; release dates are ISO 8601.
- the marks its parser reads as syntax are dropped, a code span's backticks and a link's
address among them.

The DOCX export writes the text as authored, so Word showed `**bold**` with its asterisks and
none of the bold, without a note. It still writes it so; the note now says the markdown marks
are written as letters:
The DOCX export wrote the text as authored, so Word showed `**bold**` with its asterisks and
none of the bold, without a note. The note now says the markdown marks are written as letters,
where they still are — a paragraph is written as the page sets it wherever the page's lines show
how (the entry above):
- the paragraph's note (`ParagraphNode`);
- a zone paragraph's, on its `page zone` note;
- a list's, for its items (`ListNode`).
Expand All @@ -159,13 +214,13 @@ follow semantic versioning; release dates are ISO 8601.
- a marker typed before a list item;
- runs, which the page never reads.

Where the lines are not read — with no layout, or composed in a table cell, whose paragraphs are
matched to their lines by text and whose lists not at all — the note says whether the page reads
Where the lines are not read — with no layout, or composed in a table cell whose paragraph no
line its table laid out carries, and a list there at all — the note says whether the page reads
the marks is not measured, where the page's own parser drops a mark from the text.
Across the DOCX fidelity corpus the report names one paragraph: `TimelineMinimal`'s open-source
Across the DOCX fidelity corpus the report named one paragraph, `TimelineMinimal`'s open-source
project line, whose `*(Open source)*` the page sets in italic and Word showed with its
asterisks. None of this changes what is written: the 62 documents of the corpus export to the
same bytes. In `DocxNodeFieldLedgerTest` a paragraph's `text` and a list's `nestedItems` move
asterisks — now written as the page sets it. None of this changed what is written: the 62
documents of the corpus export to the same bytes. In `DocxNodeFieldLedgerTest` a paragraph's `text` and a list's `nestedItems` move
from `WRITTEN` to `REPORTED`, and a list's `items` name it too.
- **A DOCX export's report names where a page zone's parts stand, and what its paragraphs
lose.** A page zone is written as one Word line. Word sets its parts one after another from
Expand Down
Loading
Loading