Mercurial > hg
comparison mercurial/minirst.py @ 27729:58f8b29c37ff
minirst: change hgrole to use single quotes
We decided to reserve double quotes for arguments to hg because cmd
does not like single quotes, so switch the outer quotes to single
author | timeless <timeless@mozdev.org> |
---|---|
date | Tue, 12 Jan 2016 06:03:36 +0000 |
parents | 1d7e824ad093 |
children | aaabed77791a |
comparison
equal
deleted
inserted
replaced
27728:294037159c64 | 27729:58f8b29c37ff |
---|---|
366 if b['type'] in ('paragraph', 'section'): | 366 if b['type'] in ('paragraph', 'section'): |
367 b['lines'] = [replace(l, substs) for l in b['lines']] | 367 b['lines'] = [replace(l, substs) for l in b['lines']] |
368 return blocks | 368 return blocks |
369 | 369 |
370 def hgrole(blocks): | 370 def hgrole(blocks): |
371 substs = [(':hg:`', '"hg '), ('`', '"')] | 371 substs = [(':hg:`', "'hg "), ('`', "'")] |
372 for b in blocks: | 372 for b in blocks: |
373 if b['type'] in ('paragraph', 'section'): | 373 if b['type'] in ('paragraph', 'section'): |
374 # Turn :hg:`command` into "hg command". This also works | 374 # Turn :hg:`command` into "hg command". This also works |
375 # when there is a line break in the command and relies on | 375 # when there is a line break in the command and relies on |
376 # the fact that we have no stray back-quotes in the input | 376 # the fact that we have no stray back-quotes in the input |