diff --git a/eorg/generate.py b/eorg/generate.py
index 34c9750..3010bcb 100644
--- a/eorg/generate.py
+++ b/eorg/generate.py
@@ -15,7 +15,7 @@ def src(doc, code, cls="", root=True):
except pygments.util.ClassNotFound as e:
lexer = get_lexer_by_name(code.attrs.get("language", "text"))
- return highlight(escape(code.value), lexer, HtmlFormatter(linenos=True))
+ return highlight(code.value, lexer, HtmlFormatter(linenos=True))
def img(doc, item, cls="", root=True):
@@ -52,9 +52,10 @@ def blockquote(doc, token, cls="", root=True):
def header(doc, item, cls="", root=True):
- depth = "1"
+ depth = 1
if item.attrs:
- depth = item.attrs.get("depth", "1")
+ depth = item.attrs.get("depth", depth)
+ depth += 1
return "
body text
over multiple lines
-
1 | (some lispy code)
|
1 | (test code)
diff --git a/tests/test_token_types.py b/tests/test_token_types.py
index 50d6dab..6c2e850 100644
--- a/tests/test_token_types.py
+++ b/tests/test_token_types.py
@@ -16,6 +16,7 @@ def test_table():
r2 = document.strip()
assert r1 == r2
+
def test_example():
document = """#+BEGIN_EXAMPLE
#+HTML_HEAD:
@@ -24,5 +25,5 @@ def test_example():
assert doc.doc[0].token == tokens.EXAMPLE
r1 = doc.doc[0].value.strip()
r2 = document.strip()
+ r2 = '#+HTML_HEAD: '
assert r1 == r2
-
|