From b3a4e766df4f9fa9a6582bc2aad7f28948375876 Mon Sep 17 00:00:00 2001 From: ice1000 Date: Sun, 15 Dec 2024 17:19:35 -0500 Subject: [PATCH] test: hopefully this fixes all the issues I've seen so afr --- .../test/java/org/aya/test/literate/AyaMdParserTest.java | 2 +- .../java/org/aya/syntax/literate/AyaBacktickParser.java | 6 ++---- .../src/main/java/org/aya/literate/parser/BaseMdParser.java | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cli-impl/src/test/java/org/aya/test/literate/AyaMdParserTest.java b/cli-impl/src/test/java/org/aya/test/literate/AyaMdParserTest.java index 69ee77a4f..45f7c7b11 100644 --- a/cli-impl/src/test/java/org/aya/test/literate/AyaMdParserTest.java +++ b/cli-impl/src/test/java/org/aya/test/literate/AyaMdParserTest.java @@ -83,7 +83,7 @@ public void testExtract(String caseName) throws IOException { } @ParameterizedTest - @ValueSource(strings = {"wow", "test", "hoshino-said", "heading", "compiler-output"}) + @ValueSource(strings = {"hoshino-said", "wow", "test", "heading", "compiler-output"}) public void testHighlight(String caseName) throws IOException { var oneCase = new Case(caseName); var mdFile = new SingleAyaFile.CodeAyaFile(file(oneCase.mdFile())); diff --git a/syntax/src/main/java/org/aya/syntax/literate/AyaBacktickParser.java b/syntax/src/main/java/org/aya/syntax/literate/AyaBacktickParser.java index da0d2968f..2373b15d1 100644 --- a/syntax/src/main/java/org/aya/syntax/literate/AyaBacktickParser.java +++ b/syntax/src/main/java/org/aya/syntax/literate/AyaBacktickParser.java @@ -104,12 +104,10 @@ public class AyaBacktickParser extends BacktickParser { .withNode(new Node(new IntRange(attrBeginIndex, endIndex), ATTR_SET)) .withNodes(wellNodes.asJava()); return attrIt; - } else { - result.withNode(codeSpanNode); - return endIterator; } } - return iterator; + result.withNode(codeSpanNode); + return endIterator; } private @NotNull TokensCache.Iterator skipWS(@NotNull TokensCache.Iterator it) { diff --git a/tools-md/src/main/java/org/aya/literate/parser/BaseMdParser.java b/tools-md/src/main/java/org/aya/literate/parser/BaseMdParser.java index 55336a5a4..351c76ba8 100644 --- a/tools-md/src/main/java/org/aya/literate/parser/BaseMdParser.java +++ b/tools-md/src/main/java/org/aya/literate/parser/BaseMdParser.java @@ -97,7 +97,7 @@ protected void addProviders(ArrayList