Skip to content

Commit

Permalink
Code blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfhandl committed Jul 25, 2023
1 parent cc402e6 commit 223f0c9
Show file tree
Hide file tree
Showing 2 changed files with 216 additions and 531 deletions.
5 changes: 4 additions & 1 deletion odata-protocol/temp/clean.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,12 @@ const result = await pandoc(["--eol=lf", `./${basename}-clean.html`, `-o ${basen
const raw = fs.readFileSync(`./${basename}-raw.md`, "utf8");

const final = raw
// bullet points
.replace(/\n\[· \]\{style="font-family:Symbol(;font-style:normal)?"\}/g,"- ")
.replace(/\n\[\[· \]\{style="font-family:Symbol"\}\]\{\.Datatype\}/g,"- ")
//TODO: post-process raw markdown
// code blocks
.replace(/\n::: {style="border-top:solid windowtext 1.0pt;border-left:none;border-bottom:\nsolid windowtext 1.0pt;border-right:none;padding:3.0pt 0in 3.0pt 0in;\nbackground:#D9D9D9;margin-left:.3in;margin-right:.3in"}\n([\s\S]*?)\n:::\n/g, "```\n$1\n```\n")
//TODO: examples
;

fs.writeFileSync(`./${basename}.md`, final, {encoding:"utf8"})
Expand Down
Loading

0 comments on commit 223f0c9

Please sign in to comment.