Skip to content

Feature/validate markdown #33

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 13, 2020
Merged
Show file tree
Hide file tree
Changes from 1 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
Next Next commit
setup validate markdown tests
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
  • Loading branch information
ShMcK committed Jun 13, 2020
commit e15cc9f40ef7f9dda7ba16b2edb773179d2b9702
9 changes: 9 additions & 0 deletions src/utils/validateMarkdown.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export function validateMarkdown(md: string): boolean {
// validate title (#)
// validate description
// validate level
// validate steps
// validate codeblock formats

return false;
}
11 changes: 11 additions & 0 deletions tests/markdown.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as T from "../typings/tutorial";
import { validateMarkdown } from "../src/utils/validateMarkdown";

describe("validate markdown", () => {
it.todo("should return false if missing a summary title (#)");
it.todo("should return false if contains multiple `#` headers");
it.todo("should return false if missing a summary description");
it.todo("should return false if `##` doesn't preface a level");
it.todo("should return false if `###` doesn't preface a step");
it.todo("should return true for valid markdown");
});