diff options
| author | Nick Wellnhofer <wellnhofer@aevum.de> | 2014-11-18 00:43:51 +0100 | 
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2014-11-17 21:43:47 -0800 | 
| commit | 9fe3b46ddb58ebcd2a94e59e5687fd439d0ead32 (patch) | |
| tree | a5499a9478160fcbfdf720808c278f5e26b21787 /src/html | |
| parent | 59fd5633da5395cbd3627af4a2ab855dc43ce1e0 (diff) | |
Store link labels as children in tree structure
Diffstat (limited to 'src/html')
| -rw-r--r-- | src/html/html.c | 9 | 
1 files changed, 2 insertions, 7 deletions
| diff --git a/src/html/html.c b/src/html/html.c index 1266328..2ef7206 100644 --- a/src/html/html.c +++ b/src/html/html.c @@ -127,11 +127,6 @@ static void inlines_to_plain_html(strbuf *html, cmark_node* ils)  		case NODE_LINK:  		case NODE_IMAGE: -			children = ils->as.link.label; -			visit_children = true; -			rstack = push_inline(rstack, ils->next, ""); -			break; -  		case NODE_STRONG:  		case NODE_EMPH:  			children = ils->first_child; @@ -201,7 +196,7 @@ static void inlines_to_html(strbuf *html, cmark_node* ils)  			}  			strbuf_puts(html, "\">"); -			children = ils->as.link.label; +			children = ils->first_child;  			rstack = push_inline(rstack, ils->next, "</a>");  			break; @@ -211,7 +206,7 @@ static void inlines_to_html(strbuf *html, cmark_node* ils)  				escape_href(html, ils->as.link.url, -1);  			strbuf_puts(html, "\" alt=\""); -			inlines_to_plain_html(html, ils->as.link.label); +			inlines_to_plain_html(html, ils->first_child);  			if (ils->as.link.title) {  				strbuf_puts(html, "\" title=\""); | 
