-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
9,735 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const fs = require("fs") | ||
const markdown = require('../../dist/markdown.node.js') | ||
const { exit } = require("../testutil") | ||
|
||
// https://spec.commonmark.org | ||
const source = fs.readFileSync(__dirname + "/spec.md") | ||
|
||
const timeLabel = `markdown.parse("spec.md")` | ||
console.time(timeLabel) | ||
let html = markdown.parse(source) | ||
console.timeEnd(timeLabel) | ||
|
||
html = ` | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Markdown spec</title> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<body> | ||
${html} | ||
</body> | ||
</html> | ||
`.trim() | ||
|
||
const outfile = __dirname + "/spec.html" | ||
fs.writeFileSync(outfile, html, "utf8") | ||
exit() |
Oops, something went wrong.
96d9547
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rsms where can I find the
spec.txt
file mentioned inspec.md
?I want to lend a hand with
spec.md
and thought the place to propose a change would be thespec.txt
file.