-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix StringTemplate indent bug for snippets
- Loading branch information
gsechaud
committed
Jan 27, 2017
1 parent
b856119
commit e198253
Showing
8 changed files
with
52 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
plugin/src/sbt-test/paradox/snippet-noindent-writer/build.sbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
lazy val root = (project in file(".")). | ||
enablePlugins(ParadoxPlugin). | ||
settings( | ||
paradoxTheme := None, | ||
name := "snippet-indent" | ||
) |
19 changes: 19 additions & 0 deletions
19
plugin/src/sbt-test/paradox/snippet-noindent-writer/expected/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<div> | ||
<div> | ||
<pre class="prettyprint"><code class="language-scala">object Hello extends App { | ||
def say(str: String): Unit = { | ||
println(str) | ||
} | ||
|
||
say("hello") | ||
}</code></pre> | ||
</div> | ||
</div> | ||
|
||
<pre class="prettyprint"><code class="language-scala">object Hello extends App { | ||
def say(str: String): Unit = { | ||
println(str) | ||
} | ||
|
||
say("hello") | ||
}</code></pre> |
1 change: 1 addition & 0 deletions
1
plugin/src/sbt-test/paradox/snippet-noindent-writer/project/plugins.sbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % sys.props("project.version")) |
7 changes: 7 additions & 0 deletions
7
plugin/src/sbt-test/paradox/snippet-noindent-writer/src/main/paradox/_template/page.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<div> | ||
<div> | ||
$page.content$ | ||
</div> | ||
</div> | ||
|
||
$page.content$ |
9 changes: 9 additions & 0 deletions
9
...in/src/sbt-test/paradox/snippet-noindent-writer/src/main/paradox/code-samples/Hello.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// #hello_example | ||
object Hello extends App { | ||
def say(str: String): Unit = { | ||
println(str) | ||
} | ||
|
||
say("hello") | ||
} | ||
// #hello_example |
1 change: 1 addition & 0 deletions
1
plugin/src/sbt-test/paradox/snippet-noindent-writer/src/main/paradox/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@@snip[Hello](code-samples/Hello.scala) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
> paradox | ||
|
||
$ must-mirror target/paradox/site/main/index.html expected/index.html |