From 898d72bb85c7d01e842e8911e9f144b595970f80 Mon Sep 17 00:00:00 2001 From: Fredrik Salomonsson Date: Fri, 8 May 2020 23:20:44 -0700 Subject: Fix that the underline/underscore handle newlines --- pinentry-rofi.scm | 6 +++--- 1 file 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""2"" 'post)) (define (html-< str) "Replace < with <" -- cgit