Skip to content

v2.16.0

Latest

Choose a tag to compare

@teaguesterling teaguesterling released this 18 Nov 02:27
8ee389b

This release changes the blocks that the HTML readers emit, and duck_blocks_to_html now prints a footnote body once.

Output changes in read_html_blocks, parse_html_blocks and html_to_duck_blocks

  • Text collapses each whitespace run to one space, as a browser renders it. Source indentation
    such as "\n " used to pass through, and a markdown writer then read it as a code
    block. <pre> and <textarea> keep their whitespace.
  • A table cell is one line of text. <br> and a block child, such as a list, become one space,
    and the cell edges are trimmed. x<br>y used to read as xy, and source newlines and
    indentation stayed in the cell.
  • <meta name> values for the browser or a crawler are no longer document metadata:
    viewport, theme-color, color-scheme, format-detection, referrer,
    robots and generator. A markdown writer used to put them in the front matter.
  • A heading with no id gets a slug id of its text, by pandoc's auto_identifiers rule, as
    every duck_blocks reader does: <h2>Field guide</h2> gives attributes['id'] = 'field-guide',
    and <h2>Café</h2> gives café (#275, duckdb_markdown#111). id was absent.
    duck_blocks_to_html therefore writes <h2 id="field-guide"> after a round trip.
  • capture_attributes := 'classes' also copies role and lang (#275). A source role
    was dropped on every element, even under '*'. It now passes on every element except those
    whose block the vocabulary gives a role (section, list_item, caption). The default
    capture is unchanged.
  • Table blocks keep their columns aligned when a cell spans (#274). <td colspan="2">x</td><td>y</td>
    under three headers gave ["x","y"], so y sat under the second header. It now gives
    ["x","","y"]. rowspan fills the rows below the same way.
  • Table blocks carry the <caption> text in attributes['caption'] (#274). It was dropped.
    A table nested in the caption is left out of that text.
  • Spans read as HTML reads them: rowspan="0" spans the rest of its row group, and a leading
    + is allowed (colspan="+2"). Spans are bounded per table, so a small page cannot
    expand into a huge one.

Output change in duck_blocks_to_html

  • A footnote body prints once, inside its note span (#272). A div block with
    attributes['source_type'] = 'footnote' whose id matches an inline note is skipped,
    with its children. That div used to print the body a second time. Citation bodies, and footnote
    bodies that no note references, still print. This is the shape panduck emits for RST footnotes.

CI

  • webbed builds and passes its tests against DuckDB main again (#278, #279). An unregistered
    internal function that no longer compiled there is removed.