--- lilypond-book 2005/04/02 22:46:41 1.1.1.2 +++ lilypond-book 2005/04/02 22:49:45 1.1.1.3 @@ -615,9 +615,6 @@ re.sub ('}', '@}', re.sub ('@', '@@', s))) -def split_options (option_string): - return re.split (format_res[format]['option_sep'], option_string) - class Chunk: def replacement_text (self): return '' @@ -686,7 +683,12 @@ def do_options (self, option_string, type): self.option_dict = {} - options = split_options(option_string) + if format == HTML: + options = re.findall('[\w\.-:]+(?:\s*=\s*(?:"[^"]*"|\'[^\']*\'|\S+))?',option_string) + for i in range(len(options)): + options[i] = re.sub('^([^=]+=\s*)(?P["\'])(.*)(?P=q)','\g<1>\g<3>',options[i]) + else: + options = re.split (format_res[format]['option_sep'], option_string) for i in options: if string.find (i, '=') > 0: