diff options
Diffstat (limited to 'aux/emparse')
-rwxr-xr-x | aux/emparse | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/aux/emparse b/aux/emparse index e7e1fb5..65644e9 100755 --- a/aux/emparse +++ b/aux/emparse @@ -89,8 +89,10 @@ function format(line) { if (match(w[i], "^\\[[0-9a-z]+\\]$")) w[i] = ref(substr(w[i], 2, RLENGTH-2)) - else if (match(w[i], "^\[[0-9a-z]+\][.,:;?!]$")) + else if (match(w[i], "^\\[[0-9a-z]+\\][.,:;?!)]$")) w[i] = ref(substr(w[i], 2, RLENGTH-3)) substr(w[i], RLENGTH) + else if (match(w[i], "^\\[[0-9a-z]+\\]\\)[.,:;?!]$")) + w[i] = ref(substr(w[i], 2, RLENGTH-4)) substr(w[i], RLENGTH-1) if (match(w[i], "^`")) w[i] = "<tt>" substr(w[i], 2) @@ -98,6 +100,12 @@ function format(line) { w[i] = "<i>" substr(w[i], 2) else if (match(w[i], "^_")) w[i] = "<b>" substr(w[i], 2) + else if (match(w[i], "^\\(`")) + w[i] = "(<tt>" substr(w[i], 3) + else if (match(w[i], "^\\(\\*")) + w[i] = "(<i>" substr(w[i], 3) + else if (match(w[i], "^\\(_")) + w[i] = "(<b>" substr(w[i], 3) if (match(w[i], "`$")) w[i] = substr(w[i], 1, RSTART-1) "</tt>" @@ -105,11 +113,17 @@ function format(line) { w[i] = substr(w[i], 1, RSTART-1) "</i>" else if (match(w[i], "_$")) w[i] = substr(w[i], 1, RSTART-1) "</b>" - else if (match(w[i], "`[.,:;?!]$")) + else if (match(w[i], "`[.,:;?!)]$")) w[i] = substr(w[i], 1, RSTART-1) "</tt>" substr(w[i], RSTART+1) - else if (match(w[i], "\\*\.$")) + else if (match(w[i], "\\*[.,:;?!)]$")) w[i] = substr(w[i], 1, RSTART-1) "</i>" substr(w[i], RSTART+1) - else if (match(w[i], "_[.,:;?!]$")) + else if (match(w[i], "_[.,:;?!)]$")) + w[i] = substr(w[i], 1, RSTART-1) "</b>" substr(w[i], RSTART+1) + else if (match(w[i], "`\\)[.,:;?!]$")) + w[i] = substr(w[i], 1, RSTART-1) "</tt>" substr(w[i], RSTART+1) + else if (match(w[i], "\\*\\)[.,:;?!]$")) + w[i] = substr(w[i], 1, RSTART-1) "</i>" substr(w[i], RSTART+1) + else if (match(w[i], "_\\)[.,:;?!]$")) w[i] = substr(w[i], 1, RSTART-1) "</b>" substr(w[i], RSTART+1) printf "%s", w[i] |