Minor fixes.
parent
4958acd7da
commit
3d52c9de4d
|
@ -175,11 +175,10 @@ function titlecase(string) {
|
|||
match(a, /[[:alnum:]]/)
|
||||
a = toupper(substr(a, 1, RSTART)) substr(a, RSTART+1)
|
||||
|
||||
## Double exception 2: Set 1st word after a colon, question mark,
|
||||
## double-quotes or exclamation point in title case. This kludge handles
|
||||
## multiple colons, question marks, etc. on the line. \a is the BEL or
|
||||
## CTRL-G character.
|
||||
result = gensub(/([:?!"][^[:alnum:]]*)([a-zA-Z])/, "\\1\a\\2", "g", a)
|
||||
## Double exception 2: Set 1st word after a some punctuation marks in title
|
||||
## case. This kludge handles multiple colons, question marks, etc. on the
|
||||
## line. \a is the BEL or CTRL-G character.
|
||||
result = gensub(/([:?!"-][^[:alnum:]]*)([a-zA-Z])/, "\\1\a\\2", "g", a)
|
||||
while (match(result, /\a/)) {
|
||||
beg = substr(result, 1, RSTART-1)
|
||||
cap = toupper(substr(result, RSTART+1, 1))
|
||||
|
|
Loading…
Reference in New Issue