github iwe-org/iwe iwe-v0.32.0
v0.32.0

latest releases: iwec-v0.32.0, iwes-v0.32.0
3 hours ago

HTML in your notes now survives: comments, <details> blocks, <div>s and other raw HTML are kept as written by normalize, formatting in the editor and the write tools instead of being dropped. Queries gain two new block predicates — $comment to find blocks by the HTML comments attached to them, and $html to select (and edit or delete) HTML blocks.

iwe

Added

  • $comment block predicate matches blocks by their HTML comments (a comment line after the block, or an inline comment in its text); a string matches the whole comment text and {} matches any commented block
  • $html block predicate selects HTML blocks; their text is the HTML source, and $replaceText, $replace and $delete work on them

Changed

  • $text and $matches block predicates ignore HTML comments in the block text

Fixed

  • HTML comment lines (<!-- note -->) after a paragraph, heading, list item or quote are kept by normalize and other commands (previously dropped)
  • HTML blocks such as <div>, <details> and <script> are kept as written by normalize and other commands (previously dropped)
  • Text written as \<tag> stays escaped instead of turning into a real HTML tag
  • Raw HTML in djot documents is kept as raw HTML (previously turned into a code block or plain text)

iwes

Fixed

  • HTML comment lines (<!-- note -->) after a paragraph, heading, list item or quote are kept when a document is formatted or changed by a code action (previously dropped)
  • HTML blocks such as <div>, <details> and <script> are kept as written when a document is formatted or changed by a code action (previously dropped)
  • Text written as \<tag> stays escaped when a document is formatted instead of turning into a real HTML tag

iwec

Added

  • $comment block predicate in iwe_query filters matches blocks by their HTML comments (a comment line right after the block, or an inline comment in its text)
  • $html block predicate in iwe_query selects HTML blocks; their text is the HTML source

Changed

  • iwe_query $text and $matches block predicates ignore HTML comments in the block text

Fixed

  • HTML comment lines (<!-- note -->) are kept when write tools rewrite a document (previously dropped)
  • HTML blocks such as <div>, <details> and <script> are kept as written when write tools rewrite a document (previously dropped)
Library crates (liwe, diwe)

liwe

Added

  • Comment variants on DocumentBlock, DocumentInline, Inline, Node and GraphNode for HTML comments (comment lines were previously dropped and inline comments read as plain text)
  • Reference.comments field holds the comments written after a block reference
  • BlockOp::Comment query operator and BlockPredicate::comment builder for the $comment block predicate
  • Html variants on DocumentBlock (holding HtmlBlock), Node, GraphNode and Block for HTML blocks, kept as their exact source (previously dropped); GraphNode::Comment and GraphNode::Html share the TextLeaf struct
  • BlockType::Html and BlockPredicate::html builder for the $html block predicate

Changed

  • Inline HTML is read as Inline::RawInline("html", ...) (previously Inline::Str), and the Markdown writer writes html raw inlines as they are (previously as code spans)
  • Djot raw blocks with the html format are read as Node::Html (previously code blocks), and the djot writer writes raw inlines as `...`{=format} (previously the bare content)

Don't miss a new iwe release

NewReleases is sending notifications on new releases.