diff --git a/example/package.mill b/example/package.mill index 427a6aecd74..62190fd6c1e 100644 --- a/example/package.mill +++ b/example/package.mill @@ -252,12 +252,13 @@ object `package` extends RootModule with Module { .filter(_._2.nonEmpty) .map { case (s"see:$path", txt) => + // avoid .stripMargin, as the embedded content may contain the margin symbol s""" - |.$path ({mill-example-url}/$examplePath/$path[browse]) - |[source,scala,subs="attributes,verbatim"] - |---- - |$txt - |----""".stripMargin +.$path ({mill-example-url}/$examplePath/$path[browse]) +[source,scala,subs="attributes,verbatim"] +---- +$txt +----""" case ("scala", txt) => val title = if (seenCode) "" @@ -268,21 +269,23 @@ object `package` extends RootModule with Module { s".build.mill ($download, $browse)" } seenCode = true + // avoid .stripMargin, as the embedded content may contain the margin symbol s""" - |$title - |[source,scala,subs="attributes,verbatim"] - |---- - | - |$txt - |---- - |""".stripMargin +$title +[source,scala,subs="attributes,verbatim"] +---- + +$txt +---- +""" case ("comment", txt) => txt + "\n" case ("example", txt) => + // avoid .stripMargin, as the embedded content may contain the margin symbol s""" - |[source,bash,subs="attributes,verbatim"] - |---- - |$txt - |----""".stripMargin +[source,bash,subs="attributes,verbatim"] +---- +$txt +----""" } .mkString("\n") )