markdown-link-style

switch between inline and footnote link style in markdown documents.
git clone git://git.ricketyspace.net/markdown-link-style.git
Log | Files | Refs

commit dd3972a722514d9c49813fe1d05ee24dcf1ecb95
parent f57643a70dfe7949e398c620a2a33e9167be5c70
Author: rsiddharth <s@ricketyspace.net>
Date:   Sun,  4 Jun 2017 23:26:45 +0000

mdl_style.py: Update _get_args.

- Add `args` as an optional argument t `_get_args`.
- Update the help text for argument `link_style` and `file`.

* mdl_style.py (_get_args): Update function.

Diffstat:
mdl_style.py | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/mdl_style.py b/mdl_style.py @@ -252,15 +252,16 @@ def _mdl_stylize(args): print(ls(args.file), end='') -def _get_args(): + +def _get_args(args=None): parser = argparse.ArgumentParser() parser.add_argument('--version', action='version', version=__version__) parser.add_argument('link_style', choices=['inline', 'footnote'], - help='Markdown Link style.') + help='markdown link style.') parser.add_argument('file', type=argparse.FileType('r'), - help='Path to Markdown file.') - return parser.parse_args() + help='path to markdown file.') + return parser.parse_args(args) def main():