Skip to content

Commit d6ef111

Browse files
处理换行符错误的问题;release 0.5.3
1 parent 8a3f635 commit d6ef111

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"private": true,
44
"description": "A website to generate CNOI-style statements for competitive programming.",
55
"license": "AGPL-3.0",
6-
"version": "0.5.2",
6+
"version": "0.5.3",
77
"type": "module",
88
"repository": {
99
"url": "https://github.com/Mr-Python-in-China/cnoi-statement-generator"

src/compiler/remarkTypst/compiler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export const handlers = {
111111
},
112112
break: (_node, ctx) => {
113113
const { data } = ctx;
114-
data.push("\\n");
114+
data.push(`#"\\n"`);
115115
},
116116
emphasis: (node, ctx) => {
117117
const { data } = ctx;

tests/unit/remark-typst.common.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ describe("Handlers", () => {
203203
test("Line Break", () => {
204204
const ctx = initContext();
205205
handlers.break({ type: "break" }, ctx);
206-
expect(ctx.data.join("")).toBe("\\n");
206+
expect(ctx.data.join("")).toBe(`#"\\n"`);
207207
});
208208
test("Emphasis", () => {
209209
const ctx = initContext();

0 commit comments

Comments
 (0)