Laika v0.14.0 Release Notes

Release Date: 2020-02-28 // about 4 years ago
  • Introduce Support for Scala.js

    • ๐Ÿ‘Œ Support for Scala.js 1.0 for the laika-core module:
      • Brings the complete functionality of Laika to Scala.js with the only
        ๐Ÿ‘ exceptions being File/Stream IO and support for PDF and EPUB output
      • Eliminate the last, semi-hidden usages of Java reflection to enable Scala.js support
      • Avoid use of java.time.Instant in the shared base to not force another heavy dependency
        on Scala.js users
    • Laika's integrated syntax highlighting:
      • Add support for Dotty, JSX/TSX, SQL, EBNF, Laika's own AST format
    • ๐Ÿ“œ Parser APIs:
      • Introduce PrefixedParser trait to make span parser optimizations implicit
        for 90% of the use cases and no longer require the developer to explicitly
        supply a set of possible start characters for the span
      • Introduce new parser for delimiters that generalizes typical checks for preceding
        ๐Ÿ“œ and following characters in markup parsers (e.g. delimiter("**").prevNot(whitespace)),
        ๐Ÿ“œ to reduce boilerplate for inline parsers
      • Introduce shortcuts for very common usages of text parsers (e.g. oneOf('a','b') instead of
        anyOf('a','b').take(1))
      • Expand the API of the Parser base trait: add source method for obtaining the consumed
        ๐Ÿ“œ part of the input instead of the result of the parser, and count to obtain the number of
        consumed characters
      • Introduce laika.parse.implicits._ for extension methods for common parsers, e.g.
        .concat, mapN.
      • Introduce shortcut for repeating a parser with a separator
      • Deprecate all APIs that relied on implicit conversions
      • Deprecate some of the rather cryptic symbol methods on Parser in favor of named methods
      • DelimitedText does no longer have a type parameter
    • AST changes and improvements:
      • Introduce RelativePath as a separate type in addition to the existing Path type
        which is now only used for absolute paths
      • Introduce a range of shortcut constructors for Laika's AST nodes, that allow you
        to write Paragraph("some text") instead of Paragraph(Seq(Text("some text")))
        for example
    • Directives:
      • Cleaner syntax for default attributes which are no longer part of the HOCON
        attribute block for named attributes
    • Demo App:
      • Cleanup from six to two (bigger) panels for improved usability
      • Use Laika's own syntax highlighting in the output
      • Allow to switch from JVM execution to Scala.js
      • Move from Akka HTTP to http4s
      • Integrate source into Laika's main repository
    • ๐Ÿ›  Bugfix:
      • Syntax highlighting for interpolated strings in Scala was broken in 0.13.0
      • Fix a flaky test that relied on the ordering of HashMap entries