aboutsummaryrefslogtreecommitdiffstats
path: root/pinentry-rofi.scm
diff options
context:
space:
mode:
authorFredrik Salomonsson <plattfot@gmail.com>2020-05-08 23:20:44 -0700
committerFredrik Salomonsson <plattfot@gmail.com>2020-05-08 23:20:44 -0700
commit898d72bb85c7d01e842e8911e9f144b595970f80 (patch)
treef8631c94f6370eac8cf888f96946e7a9467958a2 /pinentry-rofi.scm
parente105fee42bd5541cfa5dff5993282a6cc730b29d (diff)
downloadpinentry-rofi-898d72bb85c7d01e842e8911e9f144b595970f80.tar.gz
Fix that the underline/underscore handle newlines
Diffstat (limited to 'pinentry-rofi.scm')
-rwxr-xr-xpinentry-rofi.scm6
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|&#10;|\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|&#10;|\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|&#10;|\n|[[:blank:]])_([[:alpha:]])" str
'pre 1"<u>"2"</u>" 'post))
(define (html-< str)
"Replace < with &lt;"