Skip to content

Commit

Permalink
merge: hopefully this fixes all the issues I've seen so far (#1217)
Browse files Browse the repository at this point in the history
![image](https://github.com/user-attachments/assets/dbf61d81-1fab-451a-b4a2-1d5a93e18443)

Bugs like this, also non-Aya inline code blocks are not corrcetly parsed
  • Loading branch information
ice1000 authored Dec 15, 2024
2 parents e61024d + b3a4e76 commit e4486ef
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ protected void addProviders(ArrayList<MarkerBlockProvider<MarkerProcessor.StateI
public static final TokenSet NATURAL_EOL = TokenSet.create(
MarkdownElementTypes.PARAGRAPH, MarkdownElementTypes.BLOCK_QUOTE,
MarkdownElementTypes.CODE_FENCE, MarkdownElementTypes.CODE_BLOCK,
MarkdownElementTypes.ORDERED_LIST, MarkdownElementTypes.UNORDERED_LIST,
MarkdownElementTypes.ORDERED_LIST, MarkdownElementTypes.UNORDERED_LIST, MarkdownElementTypes.LIST_ITEM,
GFMElementTypes.TABLE, GFMElementTypes.BLOCK_MATH,
FrontMatterHeaderProvider.FRONT_MATTER_HEADER
);
Expand Down

0 comments on commit e4486ef

Please sign in to comment.