summaryrefslogtreecommitdiff
path: root/pycco/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'pycco/main.py')
-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