-
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.
Merge pull request #22 from jonas/21-support-multiple-snip-sections
Aggregate from multiple snip sections
- Loading branch information
Showing
8 changed files
with
78 additions
and
12 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
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
15 changes: 15 additions & 0 deletions
15
plugin/src/sbt-test/paradox/snippets/expected/multiple.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 |
---|---|---|
@@ -1,3 +1,18 @@ | ||
<pre class="prettyprint"><code class="language-scala">import scala.concurrent.duration._ | ||
|
||
case class Measurement(method: Method, duration: Duration)</code></pre> | ||
<pre class="prettyprint"><code class="language-scala">import scala.util.Try | ||
|
||
def parseInt(s: String): Option[Int] = Try(s.toInt).toOption</code></pre> | ||
<pre class="prettyprint"><code class="language-conf"># HTTP Configuration | ||
http { | ||
port=80 | ||
host=0.0.0.0 | ||
} | ||
|
||
# Database Configuration | ||
db { | ||
url=jdbc:mysql://mydb/mytable | ||
user=dev | ||
pass=secret | ||
}</code></pre> |
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
4 changes: 4 additions & 0 deletions
4
plugin/src/sbt-test/paradox/snippets/src/main/paradox/multiple.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 |
---|---|---|
@@ -1 +1,5 @@ | ||
@@ snip [multiple snippet](../../test/scala/Multiple.scala) { #multiple } | ||
|
||
@@ snip [multi-label snippet](../../test/scala/Multiple.scala) { #parseint-imports #parseint-def } | ||
|
||
@@ snip [multi-label conf snippet](../../test/scala/Multiple.scala) { #http-config #db-config type=conf } |
4 changes: 4 additions & 0 deletions
4
plugin/src/sbt-test/paradox/snippets/src/main/paradox/snippets.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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
@@ snip [indented snippet](../../test/scala/Snippets.scala) { #indented } | ||
|
||
@@ snip [typed snippet](../../test/scala/Snippets.scala) { #config type=conf } | ||
|
||
@@ snip [symbols @ EOL snippet](../../test/scala/Snippets.scala) { identifier=symbols-at-eol } | ||
|
||
@@ snip [lenient space snippet](../../test/scala/Snippets.scala) { #space-after-marker } |
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
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