mdoc

mdoc

  • Docs
  • Blog
  • GitHub

›Recent Posts

Recent Posts

  • Fast typechecked markdown documentation with clear error messages
  • mdoc v1.3.0
  • mdoc v1.2.4
  • mdoc v1.1.1
  • mdoc v1.1.0

mdoc v1.1.0

December 31, 2018

Ólafur Páll Geirsson

Ólafur Páll Geirsson

New object encoding

It's now possible to declare sealed ADTs like below without getting a warning warning: The outer reference in this type test cannot be checked at run time..

sealed abstract class Maybe[+A] extends Product with Serializable

final case class Just[A](value: A) extends Maybe[A]
final case object Nothing extends Maybe[Nothing]

The error happened because we wrapped the code in class Session { class App { ... } }. Now, we wrap the code in object Session { object App { ... } } instead, which removes the warning.

Thanks @nrinaudo for reporting!

Multiple modifiers

It's now possible to combine modifiers like reset:silent or reset:fail.

```scala mdoc
val x = 1
```

```scala mdoc:reset:fail
println(x)
```

This example produces the following output.

val x = 1
// x: Int = 1
println(x)
// error: not found: value x
// println(x)
//         ^

Relative filenames in :crash stacktraces

Previously, stack traces from :crash included absolute paths. Now they include only relative filenames.

 // scala.MatchError: final val x = 2 (of class scala.meta.Defn$Val$DefnValImpl)
-//  at repl.Session.$anonfun$app$47(/Users/ollie/dev/scalameta-tutorial/docs/trees/guide.md:252)
+//  at repl.Session.$anonfun$app$47(guide.md:252)
Recent Posts
  • New object encoding
  • Multiple modifiers
  • Relative filenames in :crash stacktraces
mdoc
Docs
Get started
Community
Chat on Gitter
More
GitHub
Copyright © 2025 mdoc developers