(underline nil)
(strikethrough nil)
(prev-point (point)))
- (while (re-search-forward (rx (any "\x02\x1D\x1F\x1E")) nil t)
+ (while (re-search-forward (rx (or (any "\x02\x1D\x1F\x1E\x0F")
+ (: "\x03" (+ digit) (opt "," (* digit))))) nil t)
(let ((beg (+ (match-beginning 0) 1)))
(if bold
(add-face-text-property prev-point beg '(:weight bold)))
("\x02" (setq bold (not bold)))
("\x1D" (setq italics (not italics)))
("\x1F" (setq underline (not underline)))
- ("\x1E" (setq strikethrough (not strikethrough))))
+ ("\x1E" (setq strikethrough (not strikethrough)))
+ ("\x0F" ; Reset
+ (setq bold nil)
+ (setq italics nil)
+ (setq underline nil)
+ (setq strikethrough nil))
+ (_))
(delete-region (match-beginning 0) (match-end 0))
(setq prev-point (point)))))
(buffer-string)))