Skip to content

Commit

Permalink
Allow block elements in slides fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgio committed Jul 23, 2024
1 parent efbac0f commit 2318204
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class QuarkdownHtmlNodeRenderer(context: Context) : BaseHtmlNodeRenderer(context
override fun visit(node: MathSpan) = INLINE_MATH_FENCE + "$" + node.expression + "$" + INLINE_MATH_FENCE

override fun visit(node: SlidesFragment): CharSequence =
tagBuilder("p", node.children)
tagBuilder("div", node.children)
.classes("fragment", node.behavior.asCSS)
.build()

Expand Down
6 changes: 3 additions & 3 deletions stdlib/src/main/kotlin/eu/iamgio/quarkdown/stdlib/Slides.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package eu.iamgio.quarkdown.stdlib

import eu.iamgio.quarkdown.ast.InlineMarkdownContent
import eu.iamgio.quarkdown.ast.MarkdownContent
import eu.iamgio.quarkdown.ast.quarkdown.SlidesConfigurationInitializer
import eu.iamgio.quarkdown.ast.quarkdown.SlidesFragment
import eu.iamgio.quarkdown.document.slides.Transition
Expand Down Expand Up @@ -44,10 +44,10 @@ fun setSlidesConfiguration(
* shows its content when the user attempts to go to the next slide.
* Multiple fragments in the same slide are shown in order on distinct user interactions.
* @param behavior visibility type of the fragment and how it reacts to user interactions
* @param content content to show
* @param content content to show/hide
* @return the fragment node
*/
fun fragment(
behavior: SlidesFragment.Behavior = SlidesFragment.Behavior.SHOW,
content: InlineMarkdownContent,
content: MarkdownContent,
) = SlidesFragment(behavior, content.children).wrappedAsValue()

0 comments on commit 2318204

Please sign in to comment.