]> git.donarmstrong.com Git - lilypond.git/commitdiff
SVG backend: robustify glyph-matching regexp
authorPatrick McCarty <pnorcks@gmail.com>
Sun, 30 Aug 2009 00:37:18 +0000 (17:37 -0700)
committerPatrick McCarty <pnorcks@gmail.com>
Sun, 30 Aug 2009 00:44:35 +0000 (17:44 -0700)
Use the [:space:] POSIX character class instead of [\r\n\t ]; it is more
legible, and it also accounts for formfeeds and vertical tabs too.

scm/output-svg.scm

index 0d5dda4e95e19d43cf118f8225b99b40ced64459..7d7a6b343717a07b987642dbe7a359fa0c19fdf7 100644 (file)
 ;;
 (define (glyph-element-regexp name)
   (make-regexp (string-append "<glyph"
-                             "(([\r\n\t ]+[-a-z]+=\"[^\"]*\")+)?"
-                             "[\r\n\t ]+glyph-name=\"("
+                             "(([[:space:]]+[-a-z]+=\"[^\"]*\")+)?"
+                             "[[:space:]]+glyph-name=\"("
                              name
                              ")\""
-                             "(([\r\n\t ]+[-a-z]+=\"[^\"]*\")+)?"
-                             "([\r\n\t ]+)?"
+                             "(([[:space:]]+[-a-z]+=\"[^\"]*\")+)?"
+                             "([[:space:]]+)?"
                              "/>")))
 
 (define (extract-glyph all-glyphs name size . rest)