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
- Brings the complete functionality of Laika to Scala.js with the only
- 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: addsource
method for obtaining the consumed
๐ part of the input instead of the result of the parser, andcount
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
- Introduce
- 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 writeParagraph("some text")
instead ofParagraph(Seq(Text("some text")))
for example
- Introduce RelativePath as a separate type in addition to the existing Path type
- Directives:
- Cleaner syntax for default attributes which are no longer part of the HOCON
attribute block for named attributes
- Cleaner syntax for default attributes which are no longer part of the HOCON
- 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
- ๐ Support for Scala.js 1.0 for the laika-core module: