diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2017-02-01 14:02:45 +0100 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2017-02-01 14:02:45 +0100 |
commit | dbbb7a3d9a668bbb8b62bec38f065f2444dacb91 (patch) | |
tree | 1b3a1e0301edd252f909f53f98dd2afff44cc4ee /doc-tool/src/dotty/tools/dottydoc/staticsite/tags.scala | |
parent | e47840b7e80436dc9b5a371b2093fbceb3b27a02 (diff) | |
download | dotty-dbbb7a3d9a668bbb8b62bec38f065f2444dacb91.tar.gz dotty-dbbb7a3d9a668bbb8b62bec38f065f2444dacb91.tar.bz2 dotty-dbbb7a3d9a668bbb8b62bec38f065f2444dacb91.zip |
Refactor templates and pages to deal with `SourceFile`
This commit is the first step towards having reportable errors in the
template files
Diffstat (limited to 'doc-tool/src/dotty/tools/dottydoc/staticsite/tags.scala')
-rw-r--r-- | doc-tool/src/dotty/tools/dottydoc/staticsite/tags.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/doc-tool/src/dotty/tools/dottydoc/staticsite/tags.scala b/doc-tool/src/dotty/tools/dottydoc/staticsite/tags.scala index 7f85846dc..51b3b760f 100644 --- a/doc-tool/src/dotty/tools/dottydoc/staticsite/tags.scala +++ b/doc-tool/src/dotty/tools/dottydoc/staticsite/tags.scala @@ -108,7 +108,7 @@ object tags { } } - case class ResourceInclude(params: Map[String, AnyRef], includes: Map[String, String]) + case class ResourceInclude(params: Map[String, AnyRef], includes: Map[String, Include]) extends Tag("include") { import scala.collection.JavaConverters._ val DefaultExtension = ".html" @@ -124,7 +124,9 @@ object tags { .get(incResource) .map { template => if (nodes.length > 1) ctx.put(origInclude, nodes(1).render(ctx)) - LiquidTemplate(template).render(Map.empty ++ ctx.getVariables.asScala, includes) + + LiquidTemplate(template.path, template.show) + .render(ctx.getVariables.asScala.toMap, includes) } .getOrElse { /*dottydoc.*/println(s"couldn't find include file '$origInclude'") |