added cmark options
This commit is contained in:
+2
-1
@@ -14,6 +14,7 @@ FAVICON_PREFIX :: "<link rel=\"icon\" type=\"image\\x-icon\" href=\"/imgs/favico
|
||||
MASTODON_PREFIX :: "<a rel=me href=https://linuxrocks.online/@simonkellet></a>\n"
|
||||
HIGHLIGHT_JS_PREFIX :: "<script type=\"text/javascript\" src=\"https://unpkg.com/@highlightjs/cdn-assets@11.11.1/highlight.min.js\"></script>\n<script type=\"text/javascript\" src=\"https://unpkg.com/highlightjs-odinlang@1.4.0/dist/odin.min.js\"></script>\n\n<script type=\"text/javascript\">\n hljs.highlightAll();\n</script>"
|
||||
|
||||
CMARK_OPTIONS :: cm.Options{.Unsafe, .Smart}
|
||||
|
||||
// Write important HTML prefixes to files. This includes:
|
||||
// - css, utf8, favicon, mastadon and, conditionally, hljs
|
||||
@@ -98,7 +99,7 @@ walk_tree :: proc(path: string) -> []u8 {
|
||||
// according to mem's tracking allocator...
|
||||
parse_file_md_to_html :: proc(filename: string, allocator := context.allocator, ) -> (parsed: string, err: os.Error) {
|
||||
str := os.read_entire_file_from_path(filename, allocator) or_return
|
||||
root := cm.parse_document_from_string(string(str), cm.DEFAULT_OPTIONS)
|
||||
root := cm.parse_document_from_string(string(str), CMARK_OPTIONS)
|
||||
//root := cm.parse_document(raw_data(str), len(str), cm.DEFAULT_OPTIONS)
|
||||
defer cm.node_free(root)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user