From 7aa047fa16ba47d304ee49e7552739b96abc7c72 Mon Sep 17 00:00:00 2001 From: Romain Manni-Bucau Date: Tue, 2 Jul 2024 20:02:52 +0200 Subject: [PATCH] [asciidoc] use options for ifeval instead of label which is empty in general --- .../src/main/java/io/yupiik/asciidoc/parser/Parser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asciidoc-java/src/main/java/io/yupiik/asciidoc/parser/Parser.java b/asciidoc-java/src/main/java/io/yupiik/asciidoc/parser/Parser.java index 23de5dd..efc584c 100644 --- a/asciidoc-java/src/main/java/io/yupiik/asciidoc/parser/Parser.java +++ b/asciidoc-java/src/main/java/io/yupiik/asciidoc/parser/Parser.java @@ -774,7 +774,7 @@ private List parseLine(final Reader reader, final String line, doParse(new Reader(readIfBlock(reader)), l -> true, resolver, currentAttributes, false), macro.options())); case "ifeval" -> elements.add(new ConditionalBlock( - new ConditionalBlock.Ifeval(parseCondition(macro.label().strip(), currentAttributes)), + new ConditionalBlock.Ifeval(parseCondition(macro.label().isBlank() ? line.substring(i + 1, end).strip() : macro.label().strip(), currentAttributes)), doParse(new Reader(readIfBlock(reader)), l -> true, resolver, currentAttributes, false), macro.options())); default -> elements.add(macro);