add explicit width to img and fix render repetition bug when

markup.start is 0
This commit is contained in:
realaravinth
2021-11-02 22:44:35 +05:30
parent 7fdf255678
commit 8e9b070d46
2 changed files with 5 additions and 6 deletions

View File

@ -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" {.>