diff --git a/cli-impl/src/test/java/org/aya/test/cli/RenderOptionsTest.java b/cli-impl/src/test/java/org/aya/test/cli/RenderOptionsTest.java index 791ccb3b6..fee47b74d 100644 --- a/cli-impl/src/test/java/org/aya/test/cli/RenderOptionsTest.java +++ b/cli-impl/src/test/java/org/aya/test/cli/RenderOptionsTest.java @@ -28,7 +28,7 @@ public class RenderOptionsTest { assertEquals("`hello'", opt.render(RenderOptions.OutputTarget.ANSI16, doc, opts)); assertEquals("\\texttt{hello}", opt.render(RenderOptions.OutputTarget.LaTeX, doc, opts)); assertEquals("\\texttt{hello}", opt.render(RenderOptions.OutputTarget.KaTeX, doc, opts)); - assertEquals("hello", opt.render(RenderOptions.OutputTarget.HTML, doc, opts)); + assertEquals("hello", opt.render(RenderOptions.OutputTarget.HTML, doc, opts)); assertEquals("`hello`", opt.render(RenderOptions.OutputTarget.Plain, doc, opts)); } } diff --git a/pretty/src/main/java/org/aya/pretty/doc/Doc.java b/pretty/src/main/java/org/aya/pretty/doc/Doc.java index fe761e473..616d7db1a 100644 --- a/pretty/src/main/java/org/aya/pretty/doc/Doc.java +++ b/pretty/src/main/java/org/aya/pretty/doc/Doc.java @@ -260,7 +260,7 @@ record PageWidth(@NotNull IntFunction docBuilder) implements Doc { } static @NotNull Doc code(@NotNull String code) { - return code(Language.Builtin.Aya, plain(code)); + return code(Language.Builtin.Plain, plain(code)); } static @NotNull Doc code(@NotNull Doc code) { 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 351c76ba8..a5dfde693 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 @@ -37,6 +37,7 @@ import org.jetbrains.annotations.Nullable; import java.util.ArrayList; +import java.util.Objects; public class BaseMdParser { /** For empty line that end with \n, the index points to \n */ @@ -258,7 +259,7 @@ protected record InlineLinkData(@Nullable String title, @NotNull String destinat if (type == MarkdownElementTypes.CODE_SPAN) { var content = new StripSurrounding(node, 1); - return new Literate.InlineCode(content.literal(), content.sourcePos()); + return new Literate.InlineCode(content.literal(), Objects.requireNonNull(content.sourcePos())); } if (type == GFMElementTypes.INLINE_MATH) {