summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-11-02 10:07:10 +0100
committerTor Andersson <tor@ccxvii.net>2023-11-02 15:33:12 +0100
commit3aa4b9c8a24c6cca5e132b9b1b521d7d74d77bba (patch)
tree3e551888c8a34de49e6d399ba4131c129ccca20e /play.js
parent2177473a839c4599646b3852e2eb090243ee1f77 (diff)
downloadalgeria-3aa4b9c8a24c6cca5e132b9b1b521d7d74d77bba.tar.gz
More log formatting tweaks.
Diffstat (limited to 'play.js')
-rw-r--r--play.js37
1 files changed, 20 insertions, 17 deletions
diff --git a/play.js b/play.js
index 9c92a4d..9a8d8a1 100644
--- a/play.js
+++ b/play.js
@@ -973,6 +973,11 @@ function sub_unit_name(_match, p1, _offset, _string) {
function on_log(text) { // eslint-disable-line no-unused-vars
let p = document.createElement("div")
+ if (text.match(/^>>/)) {
+ text = text.substring(2)
+ p.className = "ii"
+ }
+
if (text.match(/^>/)) {
text = text.substring(1)
p.className = "i"
@@ -995,31 +1000,29 @@ function on_log(text) { // eslint-disable-line no-unused-vars
text = text.substring(4)
p.className = 'h1'
}
- else if (text.match(/^\.h2g/)) {
- text = text.substring(5)
- p.className = 'h2 gov'
- }
- else if (text.match(/^\.h2f/)) {
- text = text.substring(5)
- p.className = 'h2 fln'
- }
- else if (text.match(/^\.h2o/)) {
- text = text.substring(5)
- p.className = 'h2 oas'
- }
else if (text.match(/^\.h2/)) {
text = text.substring(4)
p.className = 'h2'
- if (text.match(/^FLN /)) {
+ if (text.match(/^FLN/)) {
p.classList.add("fln")
- } else if (text.match(/^Government /)) {
+ } else if (text.match(/^Gov/)) {
p.classList.add("gov")
- } else if (text.match(/^OAS /)) {
+ } else if (text.match(/^OAS/)) {
p.classList.add("oas")
- } else {
- p.classList.add("both")
}
}
+ else if (text.match(/^\.h3.gov/)) {
+ text = text.substring(8)
+ p.className = 'h3 gov'
+ }
+ else if (text.match(/^\.h3.fln/)) {
+ text = text.substring(8)
+ p.className = 'h3 fln'
+ }
+ else if (text.match(/^\.h3.oas/)) {
+ text = text.substring(8)
+ p.className = 'h3 oas'
+ }
else if (text.match(/^\.h3/)) {
text = text.substring(4)
p.className = 'h3'