diff options
| Commit | 6b8cae12cb5d60b37931332d9d8008649ae14566 (patch) | |
|---|---|---|
| Author | 2026-09-12 11:31:19 +0300 | |
| Committer | 2026-09-12 13:54:29 +0300 | |
| Files | 9ff20cdba71fff44e7b23b43e46a75276df6d7f1 /ext/highlight.awk | |
| syndamia.com-6b8cae12cb5d60b37931332d9d8008649ae14566.tar syndamia.com-6b8cae12cb5d60b37931332d9d8008649ae14566.tar.gz syndamia.com-6b8cae12cb5d60b37931332d9d8008649ae14566.zip | ||
| Parent | 918bac7614e560678d51bfba2a25582a3284bdd9 (diff) | |
feat!: Update dunbar markup
Currently the newest version of the markup is not on the main branch,
mostly because of polish and the documentation.
As an effect from the changes to the language, the sitemap is the only
thing which needs to be created externally.
1 files changed, 0 insertions, 35 deletions
| -rw-r--r-- | ext/highlight.awk | 35 |
diff --git a/ext/highlight.awk b/ext/highlight.awk deleted file mode 100644 index a1f15fa..0000000 --- a/ext/highlight.awk +++ /dev/null @@ -1,35 +0,0 @@ -BEGIN { - highlight_cmd = ENVIRON["HIGHLIGHT"] " -O html -f -S " # expected language name in the end! - highlight_out = "/tmp/__fragment" - highlight_langs = "awk,bat,bison,y,bash,sh,zsh,yacc,c,cpp,h,hpp,csharp,cs,css," \ - "diff,patch,dockerfile,email,go,haskell,hs,html,htm,xhtml," \ - "httpd,ini,cfg,desktop,java,gradle,javascript,js,json,kotlin," \ - "lisp,cl,clisp,sbcl,lua,makefile,mk,markdown,md,meson,mssql," \ - "nix,perl,pl,php,python,py,qmake,rust,rs,s,sql,svg,tex,toml,xml,yaml" -} - -ENVIRON["HIGHLIGHT"] && language && blocks_names[blocks_opened] == "CODE" { - hl_lang = tolower(language) - if (hl_lang == "yacc") hl_lang = "y" - if (hl_lang == "latex") hl_lang = "tex" - - transcludes_file = toupper($1) == "'INCLUDE" || toupper($1) == "'SNIPPET" - - if (highlight_langs ~ hl_lang && (transcludes_file || !/^[ \t]*'/)) { - __tmp = FILE_EXTENSION - FILE_EXTENSION = "" - - if (transcludes_file) - process_command(toupper(substr($1, 2))) - - highlight = highlight_cmd hl_lang " > " highlight_out - - print | highlight - close(highlight) - - $0 = getfile(highlight_out) - gsub(/\\/, "\\\\") - - FILE_EXTENSION = __tmp - } -} |