From b5327e1608dc487502235c437884df7967eaa4e9 Mon Sep 17 00:00:00 2001 From: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> Date: Sun, 7 Jul 2024 17:10:40 +0200 Subject: [PATCH] fix inline codeblock creating a new line --- build.gradle.kts | 2 +- .../dediamondpro/minemark/elements/impl/CodeBlockElement.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 99cf039..8240357 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -21,7 +21,7 @@ plugins { } group = "dev.dediamondpro" -version = "1.2.1" +version = "1.2.1+localtest1" repositories { mavenCentral() diff --git a/src/main/java/dev/dediamondpro/minemark/elements/impl/CodeBlockElement.java b/src/main/java/dev/dediamondpro/minemark/elements/impl/CodeBlockElement.java index c133964..8182e25 100644 --- a/src/main/java/dev/dediamondpro/minemark/elements/impl/CodeBlockElement.java +++ b/src/main/java/dev/dediamondpro/minemark/elements/impl/CodeBlockElement.java @@ -36,6 +36,8 @@ public abstract class CodeBlockElement extends ChildMovingEl public CodeBlockElement(@NotNull S style, @NotNull LayoutStyle layoutStyle, @Nullable Element parent, @NotNull String qName, @Nullable Attributes attributes) { super(style, layoutStyle, parent, qName, attributes); this.codeBlockType = layoutStyle.isPreFormatted() ? CodeBlockType.BLOCK : CodeBlockType.INLINE; + // Update inline variable + this.isInline = isInline(); this.layoutStyle = this.layoutStyle.clone(); this.layoutStyle.setPartOfCodeBlock(true); }