# HG changeset patch # User Erik Zielke # Date 2010-11-02 16:44:19 # Node ID 4936a04b6792dc9d3b8380fa111463dccf34403b # Parent 6bdae8ea0b48a8f9554a96f7ce29ef9a0d6aa72d minirst: improved support for option lists. This enables minirst to parse and print option lists which have both long and short options. Before, we could only parse option lists with long options. diff --git a/mercurial/minirst.py b/mercurial/minirst.py --- a/mercurial/minirst.py +++ b/mercurial/minirst.py @@ -99,7 +99,8 @@ def findliteralblocks(blocks): return blocks _bulletre = re.compile(r'(-|[0-9A-Za-z]+\.|\(?[0-9A-Za-z]+\)|\|) ') -_optionre = re.compile(r'^(--[a-z-]+)((?:[ =][a-zA-Z][\w-]*)? +)(.*)$') +_optionre = re.compile(r'^(-([a-zA-Z0-9]), )?(--[a-z0-9-]+)' + r'((.*) +)(.*)$') _fieldre = re.compile(r':(?![: ])([^:]*)(?