fix: link formatting eating an extra character

This commit is contained in:
Aravinth Manivannan 2022-01-05 11:17:08 +05:30
parent 6424c85b98
commit ebb5d5175b
Signed by untrusted user: realaravinth
GPG key ID: AD9F0F08E855ED88

View file

@ -7,8 +7,9 @@
<. if markup.start != 0 {.>
<.= &p.text.substring(cur, (markup.start -1) as usize) .>
<.}.>
<. cur = (markup.end + 1) as usize; .>
<. cur = (markup.end) as usize; .>
<. let text = &p.text.slice(markup.start as usize..markup.end as usize); .>
<. if markup.type_ == "A" {.>
<. if let Some(anchor_type) = &markup.anchor_type {.>
<. if anchor_type == "LINK" {.>