Skip to content

Commit

Permalink
Fix backwards compatibility and add comma
Browse files Browse the repository at this point in the history
  • Loading branch information
DeDiamondPro committed May 8, 2023
1 parent 003f400 commit 8144287
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions api/Elementa.api
Original file line number Diff line number Diff line change
Expand Up @@ -3152,6 +3152,7 @@ public final class gg/essential/elementa/markdown/MarkdownComponent : gg/essenti
public fun <init> (Ljava/lang/String;Lgg/essential/elementa/markdown/MarkdownConfig;)V
public fun <init> (Ljava/lang/String;Lgg/essential/elementa/markdown/MarkdownConfig;F)V
public fun <init> (Ljava/lang/String;Lgg/essential/elementa/markdown/MarkdownConfig;FLgg/essential/elementa/font/FontProvider;)V
public synthetic fun <init> (Ljava/lang/String;Lgg/essential/elementa/markdown/MarkdownConfig;FLgg/essential/elementa/font/FontProvider;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun <init> (Ljava/lang/String;Lgg/essential/elementa/markdown/MarkdownConfig;FLgg/essential/elementa/font/FontProvider;Z)V
public synthetic fun <init> (Ljava/lang/String;Lgg/essential/elementa/markdown/MarkdownConfig;FLgg/essential/elementa/font/FontProvider;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun <init> (Ljava/lang/String;Lgg/essential/elementa/markdown/MarkdownConfig;FLgg/essential/elementa/font/FontProvider;ZLgg/essential/elementa/components/image/ImageCache;)V
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,25 @@ class MarkdownComponent(
private val codeFontPointSize: Float = 10f,
private val codeFontRenderer: FontProvider = ElementaFonts.JETBRAINS_MONO,
private val disableSelection: Boolean = false,
val imageCache: ImageCache? = null
val imageCache: ImageCache? = null,
) : UIComponent() {

@JvmOverloads
constructor(
text: String,
config: MarkdownConfig = MarkdownConfig(),
codeFontPointSize: Float = 10f,
codeFontRenderer: FontProvider = ElementaFonts.JETBRAINS_MONO,
disableSelection: Boolean = false
disableSelection: Boolean = false,
) : this(text, config, codeFontPointSize, codeFontRenderer, disableSelection, null)

@JvmOverloads
constructor(
text: String,
config: MarkdownConfig = MarkdownConfig(),
codeFontPointSize: Float = 10f,
codeFontRenderer: FontProvider = ElementaFonts.JETBRAINS_MONO,
) : this(text, config, codeFontPointSize, codeFontRenderer, false)

private val configState = BasicState(config)
val config: MarkdownConfig
get() = configState.get()
Expand Down

0 comments on commit 8144287

Please sign in to comment.