Skip to content

Version 5.0.0

Choose a tag to compare

@SDGGiesbrecht SDGGiesbrecht released this 14 Jan 07:39
· 110 commits to master since this release
770bc80

Breaking Changes

  • Site generation and its API replace many uses of strings with direct use of syntax nodes.
    • Instead of a frame and a string processor, sites now use syntax unfolders. Arbitrary reusable components (including frames) can be implemented using custom unfolders. See the “New Features” section for more information.
    • Metadata is no longer a separate comment. It is now supplied using attributes on the root element. The root element should usually be <page> or something that unfolds into (and through) it.
    • Localization is now a phase of syntax unfolding: <localized><en>English</en><fr>Français</fr></localized>. The old style ([* English */* Français *]) is no longer supported.
  • Redirect has been replaced with a factory method: DocumentSyntax.redirect(language:target:).
  • AttributedSyntax’s class: String? property has been changed to classes: [String].

New Features

  • ElementSyntax has convenient factory methods for constructing common elements.
  • Syntax nodes can be “unfolded”. Custom unfolders can be set up to unfold custom pseudo‐elements into standard HTML. These can be used to create reusable shorthand for more complicated elements. For example, the default unfolder contains a rule that changes <foreign>...</foreign> into <span class="foreign">...</span>.

Bug Fixes

  • The root CSS styles handle more:
    • Paragraphs use book style by default (unspaced, indented, justified and hyphenated).
    • Print media adjusts links:
      • Links are not highlighted.
      • Navigation blocks are removed.
  • Unescaping now handles all entities.