Repository navigation
0.1.35
Behavior corrections as per spec
- An unquoted line after a quoted paragraph continues it only when the line opens no block.
> afollowed by- tailis now a quote and a separate list, as in djot.js and pandoc. This affects hard-wrapped quotes that prefix only their first line, where a wrapped line starts with-,1.,#or similar. Quotes with>on every line are unaffected. (#309) - A block attribute line has to sit directly above its block; a blank line in between detaches it. (#302)
- A fence line with spaces in its language is inline verbatim, not a code block. (#302)
- A list item's blocks are parsed in one piece: content after a blank line stays in a definition or footnote that the item's first block opened, some lists that rendered loose are now tight, and every paragraph of a tight item renders without
<p>. (#316) - A div fence takes at most one class name.
::: warning extraor::: *is no longer a div and stays paragraph text; use a{.a .b}attribute line for several classes. (#338, #340) - An unclosed backtick string is verbatim to the end of the paragraph, so emphasis no longer closes across it, and an unclosed
$`is math. (#339, #341) - Unmatched quotes take the djot.js form: an unmatched
"is a left quote, an unmatched'is an apostrophe.a 12" pizzarendersa 12“ pizza. (#350) - Heading ids include image alt text, as in djot.js.
# Intro gets the idIntro-logo,# ![s]()getss(wass-1). Existing anchors of such headings change. (#345) - Attribute values escape only
";'stays literal, as in djot.js. Attribute names are case-folded. (#345) - The ANSI, plain-text and Markdown renderers strip terminal control characters (C0 except tab and newline, DEL, C1) from document text, ANSI div titles included. (#343, #348)
Fixes
- Parsing matches djot.js in 13 cases that the syntax description or the djot.js tests decide: forced quote markers (
{","},{','}), attribute blocks with inner whitespace or no content, attributes after inline math and after an escaped character, attribute comments, backslashes in link destinations,: termafter a closed block, lazy lines in a definition body, reference definitions inside paragraph text, closest-opener emphasis pairing, and whitespace before a hard break. (#302, #303) - A block quote ends at an unquoted line once a fence, div, thematic break, table row or reference definition has closed inside it, including inside a quoted list item. A fenced comment that interrupts a quoted paragraph no longer swallows the following line. (#305, #308)
- In a loose list item, an unindented line after a block with no open paragraph ends the list. Before, it was appended to the item, or to an open code block. (#306)
- A paragraph in a footnote takes following lines that omit the indentation, as block quotes and list items do. (#308)
- Unclosed code spans after mismatched backtick runs, a thematic break that could also read as a list item, smart typography in heading text, and the heading ID fallback for an empty ID. (#292)
- A reused footnote number keeps its first label. (#296)
- Block quotes, tables, definition lists, captions and block attribute lines are recognized when indented, and headings at any indentation. (#310)
- Footnote definitions are parsed where they occur, also inside quotes and lists, instead of being registered with no content. (#311)
- An unindented block line ends a list item, continuation lines keep their indentation, footnotes work inside list items, and a definition body may be indented by one space. (#312)
- A definition term continues on the lines below it until a blank line. (#313)
- Block attributes stay inside their container, an unclosed code fence at the end of the document no longer gains a newline, and reference URLs continue on the next line. (#314)
- An unindented line after an indented block with no open paragraph ends the item, and a footnote body indented by one space is accepted. (#315)
- In a list item or definition, a bare
>line closes a quoted paragraph. (#317) - A less indented item marker continues its list, and a list on a footnote's marker line keeps its column. (#318)
- A marker-line sublist such as
- - acloses its paragraph at a block line. (#319) - A
]inside a link destination, span attributes, a code span or an autolink no longer closes an outer[. (#320, #321) - Malformed multiline comments stay visible as text. (#322)
- Word attributes attach to a whole contraction such as
don't{.x}. djot.js attaches them totonly. (#323) - A blank line after a footnote definition loosens its list; a blank line between a table and its caption does not. (#324)
- Verbatim padding is removed separately at each end that touches a backtick, also in HTML-to-Djot output. (#325)
- Raw format fences accept
=htmlwithout a space before it. (#328) - A standalone attribute line inside an open code span of a list paragraph stays part of the code. (#329)
- A list item ending in its own bullet character, a lazy line after a later paragraph or in a nested item, an indented marker under an empty item, and an unquoted line after a closed nested quote paragraph now parse as in djot.js. (#342)
- Empty task items, a backslash before the closing cell pipe, indented table rows, marker-line sublists, and
:::closers after headings, breaks, tables and list items match djot.js. (#347, #349) - Failed attributes, link destinations with spaces and trailing spaces in definition terms match djot.js. (#350)
HtmlToDjotkeeps content past deep nesting and converts every top-level node, not only the first; a plain<div>no longer glues the next block onto its text. (#343, #348)- Docs examples show the output the code produces. (#346)
Improvements
- Smart quotes pick the wrong direction less often: a quote after a dash closes when the end, whitespace or closing punctuation follows, and listed elisions such as
'tisand'emtake an apostrophe. Explicit markers and escaped quotes behave as before. (#304) - Single smart quotes no longer nest:
'a 'b' c'renders‘a ’b’ c’. djot.js renders‘a ‘b’ c’. (#304) - Attributes after ordinary text attach to the whole preceding word, escaped characters included:
foo\*bar{.c}wrapsfoo*bar(djot.js wraps*bar). (#302) - More documents take the fast HTML path: blank-separated nested lists, aligned table headers, common Unicode, image and bullet documents, and plain documents beyond 64 KB. (#290, #292, #300)
- Malformed inline input no longer rescans the rest of the paragraph for each failed opener. This covers unclosed emphasis, attributes, links, autolinks, math and backtick runs. (#292, #295)
- Tables with row and column spans, long footnote chains, runs of class attribute blocks, repeated block attribute lines and Markdown output with many emphasis siblings are much faster on large inputs. (#296, #297, #300)
- Abbreviation dictionaries too large for a PCRE pattern are matched by a bounded matcher. (#296, #298)
- Cycle collection is paced across a conversion, which cuts time and peak memory on large tables. (#299)
- List marker probes are cached and ordinary table rows are split in bulk. (#291)
- Many list markers stacked on one line and long runs of single quotes parse in linear time; they were quadratic. Markdown import restores placeholders in one pass. (#343, #344)
Removed
InlineParser::findCodeSpanEnd(), a protected method with no callers left. Subclasses that call it must drop the call. (#344)
Full Changelog: 0.1.34...0.1.35