Skip to content

Commit 2571711

Browse files
committed
parse hints with '-'
Signed-off-by: shmck <[email protected]>
1 parent 44ba473 commit 2571711

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: src/utils/parse.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export function parseMdContent(md: string): TutorialFrame | never {
8686
const hintDetectRegex = /^(#{4}\sHINTS[\n\r]+([\*|\-]\s(?<hintContent>[^]*))[\n\r]+)+/;
8787
const hintMatch = section.match(hintDetectRegex);
8888
if (!!hintMatch) {
89-
const hintItemRegex = /[\n\r]+\*\s/;
89+
const hintItemRegex = /[\n\r]+[\*|\-]\s/;
9090
const hints = section
9191
.split(hintItemRegex)
9292
.slice(1) // remove #### HINTS

Diff for: tests/parse.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,7 @@ The first step
10001000
expect(result.levels).toEqual(expected.levels);
10011001
});
10021002

1003-
xit("should parse hints for a step with '-'", () => {
1003+
it("should parse hints for a step with '-'", () => {
10041004
const md = `# Title
10051005
10061006
Description.

0 commit comments

Comments
 (0)