Type class for converting values to markdown inline elements.
Used by the md string interpolator to support interpolation of arbitrary types. Implement this trait for custom types to enable markdown interpolation.
Type parameters
A
The type to convert to markdown
Attributes
Example
case class Person(name: String, age: Int)
implicit val personToMarkdown: ToMarkdown[Person] = (p: Person) =>
Strong(Chunk(Text(p.name)))
val person = Person("Alice", 30) val doc = md"# User: $$person"