diff options
author | Fredrik Salomonsson <plattfot@gmail.com> | 2020-05-08 23:20:44 -0700 |
---|---|---|
committer | Fredrik Salomonsson <plattfot@gmail.com> | 2020-05-08 23:20:44 -0700 |
commit | 898d72bb85c7d01e842e8911e9f144b595970f80 (patch) | |
tree | f8631c94f6370eac8cf888f96946e7a9467958a2 | |
parent | e105fee42bd5541cfa5dff5993282a6cc730b29d (diff) | |
download | pinentry-rofi-898d72bb85c7d01e842e8911e9f144b595970f80.tar.gz |
Fix that the underline/underscore handle newlines
-rwxr-xr-x | pinentry-rofi.scm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pinentry-rofi.scm b/pinentry-rofi.scm index 69d6eb2..c66d97d 100755 --- a/pinentry-rofi.scm +++ b/pinentry-rofi.scm @@ -103,14 +103,14 @@ (define (remove-underline str) "Replace _ followed by a character with just the character." - (regexp-substitute/global #f "(^|[[:blank:]])_([[:alpha:]])" str + (regexp-substitute/global #f "(^|%0A| |\n|[[:blank:]])_([[:alpha:]])" str 'pre 1 2 'post)) (define (escape-underscore str) "Replace __ followed by a character with _ and said character. Always call this after `remove-underline' or `html-underline'." - (regexp-substitute/global #f "(^|[[:blank:]])__([[:alpha:]])" str + (regexp-substitute/global #f "(^|%0A| |\n|[[:blank:]])__([[:alpha:]])" str 'pre 1 "_" 2 'post)) (define (html-newline str) @@ -119,7 +119,7 @@ Always call this after `remove-underline' or (define (html-underline str) "Underscore followed by a character, underlines that character." - (regexp-substitute/global #f "(^|[[:blank:]])_([[:alpha:]])" str + (regexp-substitute/global #f "(^|%0A| |\n|[[:blank:]])_([[:alpha:]])" str 'pre 1"<u>"2"</u>" 'post)) (define (html-< str) "Replace < with <" |