diff options
author | Blake DeMarcy <ofunknowndescent@gmail.com> | 2017-04-24 16:24:53 -0500 |
---|---|---|
committer | Blake DeMarcy <ofunknowndescent@gmail.com> | 2017-04-24 16:24:53 -0500 |
commit | a44b60ca35de43f1a8da09fb498474d9e25c55bc (patch) | |
tree | 3462e1702c1632d8d5e56d9f0025c8d223e33f06 | |
parent | 86e91102ebe676a989f27784057002bd664805b0 (diff) | |
download | bbj-a44b60ca35de43f1a8da09fb498474d9e25c55bc.tar.gz |
small source code formatting blips
-rw-r--r-- | clients/urwid/main.py | 8 | ||||
-rw-r--r-- | src/formatting.py | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/clients/urwid/main.py b/clients/urwid/main.py index c1b2af0..fa343a3 100644 --- a/clients/urwid/main.py +++ b/clients/urwid/main.py @@ -938,9 +938,13 @@ class App(object): def formatting_help(self, *_): """ - Pops a help window with formatting directives. + Pops a help window for formatting directives. """ - message = network.fake_message("\n\n".join(format_help)) + # we can "recycle" the server's formatting abilities to + # use the same syntax for the help text itself + message = network.fake_message( + "\n\n".join(format_help), format="sequential") + widget = OptionsMenu( urwid.ListBox( urwid.SimpleFocusListWalker([ diff --git a/src/formatting.py b/src/formatting.py index 0a50d3f..a3eb73d 100644 --- a/src/formatting.py +++ b/src/formatting.py @@ -81,7 +81,6 @@ underline = re.compile(r"(?<!\\)_{2}(.+?)(?<!\\)_{2}") escapes = re.compile(r"\\([*_]{2})") - def apply_directives(text): # is there a better way to do this? smh.... text = quotes.sub(lambda m: "[quote: %s]" % m.group(1), text) |