typelevel / Laika

Site and E-book Generator and Customizable Text Markup Transformer for sbt, Scala and Scala.js
https://typelevel.org/Laika/
Apache License 2.0
410 stars 44 forks source link

test suites: simplify AST builders by using new DocumentTreeBuilder APIs #627

Closed jenshalm closed 1 month ago

jenshalm commented 1 month ago

Some of the AST builders for tests were designed before the new DocumentBuilder API was added to laika-core. Both factor out recursion from tree construction, so it's no longer necessary to maintain the builder API specific for tests. Call-sites remain very similar, the main simplification is the removal of the redundant APIs for AST construction.