diff options
author | bptato <nincsnevem662@gmail.com> | 2024-03-21 16:35:44 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-03-21 16:35:44 +0100 |
commit | 71af803e1696cd87177ca3e9b16778288b75c69b (patch) | |
tree | f68346dd8a3a549e4359e0d7db16caea9bc6fa59 /bonus/git.cgi | |
parent | e4463ecb7c435894c5a67a3377823ab0f991a191 (diff) | |
download | chawan-71af803e1696cd87177ca3e9b16778288b75c69b.tar.gz |
ansi2html: add separate switch for "standalone"
this way its output can be embedded into documents without a pointless DT declaration
Diffstat (limited to 'bonus/git.cgi')
-rwxr-xr-x | bonus/git.cgi | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bonus/git.cgi b/bonus/git.cgi index 9038f332..5bbf12a3 100755 --- a/bonus/git.cgi +++ b/bonus/git.cgi @@ -54,7 +54,7 @@ if (params[0] == "log") { const cgi = `${query.prefix}git.cgi?prefix=${query.prefix}&path=${query.path}¶ms=show`; const titleParams = params.join(' ').replace(/[&<>]/g, x => ({'&': '&', '<': '<', '>': '>'}[x])); - console.log(`<title>git ${titleParams}</title>`); + console.log(`<!DOCTYPE html>\n<title>git ${titleParams}</title>`); while ((l = f.getline()) !== null) { console.log(l.replace(/[a-f0-9]{40}/g, x => `<a href='${cgi}%20${x}'>${x}</a>`)); |