From: Petter Reinholdtsen Date: Sun, 18 Feb 2018 11:17:51 +0000 (+0000) Subject: Correct parsing of previous string to handle colons. X-Git-Tag: es-printed~491 X-Git-Url: https://pere.pagekite.me/gitweb/text-madewithcc.git/commitdiff_plain/a41d62ae57afa569b00551851dc0bde257c269a8 Correct parsing of previous string to handle colons. --- diff --git a/fixup-migrate-gettext.rb b/fixup-migrate-gettext.rb index 66785d3..2c172fb 100755 --- a/fixup-migrate-gettext.rb +++ b/fixup-migrate-gettext.rb @@ -22,9 +22,11 @@ class PoStr @type = value if type == '.' and field == 'type' @location = {:file => field, :line => value} if type == ':' if type == '|' - if field =~ /^msgid "(.*)"/ + #print lin, "\n" + if lin =~ /^\#\| msgid "(.*)"$/ + #print "first '%s'\n" % $1 @prev << $1 - elsif field =~ /^"(.*)"$/ + elsif lin =~ /^\#\| "(.*)"$/ @prev << $1 end end