diff --git a/templates/img.html b/templates/img.html
index eb56453..f8ed2ec 100644
--- a/templates/img.html
+++ b/templates/img.html
@@ -1,10 +1,7 @@
<. let metadata = p.metadata.as_ref().unwrap(); .>
-
-
diff --git a/templates/p.html b/templates/p.html
index 87fd397..77d0851 100644
--- a/templates/p.html
+++ b/templates/p.html
@@ -4,7 +4,9 @@
<.} else {.>
<. let mut cur: usize = 0; .>
<. for markup in &p.markups {.>
+ <. if markup.start != 0 {.>
<.= &p.text.substring(cur, (markup.start -1) as usize) .>
+ <.}.>
<. cur = (markup.end + 1) as usize; .>
<. let text = &p.text.slice(markup.start as usize..markup.end as usize); .>
<. if markup.type_ == "A" {.>