Fix Node Spanners
mxcop opened this issue · comments
As you can see below the Span's don't have the correct lengths and positions.
{
impl card: {
div: {
h2: {
Node { kind: Text("Test Test Test"), span: Span { pos: 101, len: 4 }, idx: 4, parent: Some(3), children: [] } (Text("Test Test Test"))
}
p: {
Node { kind: Text("tmpl"), span: Span { pos: 125, len: 4 }, idx: 6, parent: Some(5), children: [] } (Text("tmpl"))
}
br ([])
img ([Attribute { name: "src", value: Some("img.png") }])
}
}
impl @html: {
body: {
card ([Attribute { name: "header", value: Some("Card 1") }, Attribute { name: "desc", value: Some("This is card one") }])
card ([Attribute { name: "header", value: Some("Card 2") }, Attribute { name: "desc", value: Some("This is card two") }])
p: {
Node { kind: Text("Hello world"), span: Span { pos: 585, len: 5 }, idx: 14, parent: Some(13), children: [] } (Text("Hello world"))
}
}
}
}