Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

setup single hint#74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ShMcK merged 3 commits intomasterfromfix/parser-fail-on-single-hint
Oct 9, 2020
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
resolve issue with no empty spaces at end
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
  • Loading branch information
@ShMcK
ShMcK committedOct 9, 2020
commitdc457a8f2b0b57323264656f8f6a05f89f067d94
2 changes: 1 addition & 1 deletionsrc/utils/parse.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -141,7 +141,7 @@ type ParseParams = {
};

export function parse(params: ParseParams): any {
const mdContent: TutorialFrame = parseMdContent(params.text);
const mdContent: TutorialFrame = parseMdContent(params.text + "\n\n");

const parsed: Partial<T.Tutorial> = {
version: params.skeleton.version,
Expand Down
12 changes: 4 additions & 8 deletionstests/parse.test.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1189,7 +1189,7 @@ The first step
expect(result.levels).toEqual(expected.levels);
});

it("should parsea single hint", () => {
it("should parsewithout spaces at the end", () => {
const md = `# Title

Description.
Expand All@@ -1204,9 +1204,7 @@ The first step

#### HINTS

- A test with a \`backtick\`

`;
- A test with a \`backtick\``;
const skeleton = {
levels: [
{
Expand All@@ -1222,9 +1220,7 @@ The first step
const result = parse({
text: md,
skeleton,
commits: {
"1.1:T": ["abcdef1", "123456789"],
},
commits: {},
});
const expected = {
summary: {
Expand All@@ -1241,7 +1237,7 @@ The first step
id: "1.1",
content: "The first step",
setup: {
commits: ["abcdef1", "123456789"],
commits: [],
},
hints: ["A test with a `backtick`"],
},
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp