-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use new EvaluableString instead of MarkdownContent in
.code
's body …
…argument
- Loading branch information
Showing
5 changed files
with
60 additions
and
10 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
14 changes: 14 additions & 0 deletions
14
core/src/main/kotlin/eu/iamgio/quarkdown/function/value/data/EvaluableString.kt
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,14 @@ | ||
package eu.iamgio.quarkdown.function.value.data | ||
|
||
import eu.iamgio.quarkdown.function.value.ValueFactory | ||
|
||
/** | ||
* A [String] wrapper that, when used as a function parameter, lets [ValueFactory.evaluableString] evaluate the raw content. | ||
* This allows function calls and other scripting techniques to be used executed within the string itself, | ||
* which would otherwise be natively unsupported unless the [String] argument is inlined (not used as a block argument). | ||
* Inline string evaluation is handled directly by the parser [eu.iamgio.quarkdown.parser.BlockTokenParser]). | ||
* This is used for example in the `.code` stdlib function. | ||
* @param content unwrapped string content, already evaluated | ||
* @see ValueFactory.evaluableString | ||
*/ | ||
data class EvaluableString(val content: String) |
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