From fcc74be26756f707ab29bd47593006673c29be22 Mon Sep 17 00:00:00 2001 From: "Wraithan (Chris McDonald)" Date: Sat, 29 Dec 2012 09:52:21 -0800 Subject: [PATCH] pep8/style matching --- pelican/rstdirectives.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/pelican/rstdirectives.py b/pelican/rstdirectives.py index b1f1242c..c677144d 100644 --- a/pelican/rstdirectives.py +++ b/pelican/rstdirectives.py @@ -98,15 +98,18 @@ directives.register_directive('youtube', YouTube) _abbr_re = re.compile('\((.*)\)$') -class abbreviation(nodes.Inline, nodes.TextElement): pass + +class abbreviation(nodes.Inline, nodes.TextElement): + pass + def abbr_role(typ, rawtext, text, lineno, inliner, options={}, content=[]): - text = utils.unescape(text) - m = _abbr_re.search(text) - if m is None: - return [abbreviation(text, text)], [] - abbr = text[:m.start()].strip() - expl = m.group(1) - return [abbreviation(abbr, abbr, explanation=expl)], [] + text = utils.unescape(text) + m = _abbr_re.search(text) + if m is None: + return [abbreviation(text, text)], [] + abbr = text[:m.start()].strip() + expl = m.group(1) + return [abbreviation(abbr, abbr, explanation=expl)], [] roles.register_local_role('abbr', abbr_role)