mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-06 00:47:15 -04:00
fix: render urls in table (#248)
This commit is contained in:
+7
-2
@@ -306,8 +306,13 @@ func (tr *ANSIRenderer) NewElement(node ast.Node, source []byte) Element {
|
|||||||
s := ""
|
s := ""
|
||||||
n := node.FirstChild()
|
n := node.FirstChild()
|
||||||
for n != nil {
|
for n != nil {
|
||||||
s += string(n.Text(source))
|
switch t := n.(type) {
|
||||||
// s += string(n.LinkData.Destination)
|
case *ast.AutoLink:
|
||||||
|
s += string(t.Label(source))
|
||||||
|
default:
|
||||||
|
s += string(n.Text(source))
|
||||||
|
}
|
||||||
|
|
||||||
n = n.NextSibling()
|
n = n.NextSibling()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
| Label | Value |
|
| Label | Value | URL |
|
||||||
| ------ | ----- |
|
| ------ | ----- | ---------------- |
|
||||||
| First | foo |
|
| First | foo | https://charm.sh |
|
||||||
| Second | bar |
|
| Second | bar | https://charm.sh |
|
||||||
|
|||||||
Vendored
+4
-4
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
LABEL | VALUE
|
LABEL | VALUE | URL
|
||||||
---------+--------
|
---------+-------+-------------------
|
||||||
First | foo
|
First | foo | https://charm.sh
|
||||||
Second | bar
|
Second | bar | https://charm.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user