Skip to content

helloneal/scalatags-md

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

scalatags-md

import scalatags.md._

val x = div(span("Hey"))
println(md"Hey, I'm *some* markdown with $x and stuff")

This code compiles into the following:

HtmlTag(
  "p",
  List(
    StringNode(" and stuff"),
    div(span("Hey")),
    StringNode(" markdown with "),
    HtmlTag(
      "em",
      List(
        StringNode("some")
      ),
      SortedMap.empty
    ),
    StringNode("Hey, I\'m ")
  ),
  SortedMap.empty
)

Which is basically the same as this:

p(
  "Hey, I\'m ",
  em("some"),
  " markdown with ",
  div(span("Hey")),
  " and stuff"
)

About

Compile-time markdown string interpolator for Scalatags (https://github.com/lihaoyi/scalatags)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Scala 100.0%