-
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.
Allow snippets to specify multiple markers
Example: @@ snip [Code.scala](../scala/Code.scala) { #imports #functions } Fixes #21
- Loading branch information
Showing
5 changed files
with
24 additions
and
8 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
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,6 @@ | ||
<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> |
2 changes: 2 additions & 0 deletions
2
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,3 @@ | ||
@@ snip [multiple snippet](../../test/scala/Multiple.scala) { #multiple } | ||
|
||
@@ snip [comma separated snippet](../../test/scala/Multiple.scala) { #parseint-imports #parseint-def } |
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