-
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.
- Loading branch information
Showing
7 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
core/src/main/kotlin/eu/iamgio/quarkdown/ast/quarkdown/block/Collapse.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,19 @@ | ||
package eu.iamgio.quarkdown.ast.quarkdown.block | ||
|
||
import eu.iamgio.quarkdown.ast.InlineContent | ||
import eu.iamgio.quarkdown.ast.NestableNode | ||
import eu.iamgio.quarkdown.ast.Node | ||
import eu.iamgio.quarkdown.visitor.node.NodeVisitor | ||
|
||
/** | ||
* A collapsible block, whose content can be hidden or shown by interacting with it. | ||
* @param title title of the block | ||
* @param isOpen whether the block is open at the beginning | ||
*/ | ||
data class Collapse( | ||
val title: InlineContent, | ||
val isOpen: Boolean, | ||
override val children: List<Node>, | ||
) : NestableNode { | ||
override fun <T> accept(visitor: NodeVisitor<T>): T = visitor.visit(this) | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<details> | ||
<summary> | ||
<em> | ||
Hello | ||
</em> | ||
</summary> | ||
<strong> | ||
world | ||
</strong> | ||
</details> | ||
|
||
--- | ||
|
||
<details open=""> | ||
<summary> | ||
Hello | ||
</summary> | ||
<blockquote> | ||
<p> | ||
world | ||
</p> | ||
</blockquote> | ||
</details> |
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