[0.1.2] formatting update
multi-line codeblocks should no longer horribly break at the cost of not allowing tabs in them
This commit is contained in:
parent
f51418b79d
commit
4e65d573b2
12
compile.js
12
compile.js
|
@ -39,7 +39,7 @@ if(Process.argv.length < 4 && require.main === module) {
|
|||
|
||||
function markup(input, options) {
|
||||
let tableOfContents = new Remarkable().use(TOCGenerator.plugin(options)).render(input);
|
||||
let output = new Remarkable().use(RemarkableHeaderIDs()).render("# Table of contents:\n"+tableOfContents.content+"\n"+input);
|
||||
let output = new Remarkable().use(RemarkableHeaderIDs()).render("# Table of contents:\n"+tableOfContents.content+"\n\n"+input);
|
||||
return output;
|
||||
}
|
||||
|
||||
|
@ -73,6 +73,16 @@ function format(data, name) {
|
|||
.replace( /* fix tag attached to word and not whitespace */
|
||||
/(\w+)(<[a-zA-Z]\w*>)/g,
|
||||
"$1 $2"
|
||||
)
|
||||
.replace( /* replace .md links to html ones */
|
||||
/href="(.+)\.md"/g,
|
||||
"href=\"$1.html\""
|
||||
)
|
||||
.replace( /* evil codeblock fix */
|
||||
/<pre><code>((.|\n)*?)<\/code><\/pre>/g,
|
||||
function(match, inline) {
|
||||
return "<pre><code>" + inline.replace(/\t/g, "") + "</code></pre>";
|
||||
}
|
||||
);
|
||||
}
|
||||
// probably should bring in a better templating engine but whatever
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "yiki",
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "yiki",
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@liquify/prettify": "^0.5.5-beta.1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "yiki",
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"description": "The yellows111 wiki system",
|
||||
"main": "compile.js",
|
||||
"scripts": {
|
||||
|
|
Loading…
Reference in New Issue