summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach Smith <zd@zdsmith.com>2018-04-25 21:24:09 -0400
committerZach Smith <zd@zdsmith.com>2018-04-25 21:24:09 -0400
commit9b6470b2d48b0cf7c5fa7abb66cc9b0009daf272 (patch)
tree809bd12c77a985dffc4a47d99f4ac5763b057fb1
parent867f3dd1b2af5b6c767e22742453a0b2e87f2a22 (diff)
downloadpycco-9b6470b2d48b0cf7c5fa7abb66cc9b0009daf272.tar.gz
Minor reorder
-rw-r--r--pycco/main.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pycco/main.py b/pycco/main.py
index b82cadb..065be25 100644
--- a/pycco/main.py
+++ b/pycco/main.py
@@ -252,12 +252,13 @@ def highlight(sections, language, preserve_paths=True, outdir=None):
raise TypeError("Missing the required 'outdir' keyword argument.")
divider_text = language["divider_text"]
+ lexer = language["lexer"]
+ divider_html = language["divider_html"]
+
joined_text = divider_text.join(
section["code_text"].rstrip() for section in sections
)
- lexer = language["lexer"]
html_formatter = formatters.get_formatter_by_name("html")
- divider_html = language["divider_html"]
output = pygments.highlight(
joined_text, lexer, html_formatter