summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-12-30 08:06:39 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-12-30 08:06:39 -0800
commit1cea53dbc7b87434184c8a9a0901be5ea5a9c5a0 (patch)
tree1999ed86e37fb8c9240dbfd9f2a12e8ea5053e25
parent46b67b710788be7924b5a412ab68eea3cac0cd96 (diff)
Revert "man: use a variable to store the char * from node_get_url."
This reverts commit 46b67b710788be7924b5a412ab68eea3cac0cd96. I was mistaken that this helped. Which is good, because I would not have understood why it helped.
-rw-r--r--src/man.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/man.c b/src/man.c
index 3470343..1b45f8b 100644
--- a/src/man.c
+++ b/src/man.c
@@ -49,7 +49,6 @@ S_render_node(cmark_node *node, cmark_event_type ev_type, void *vstate)
cmark_node *tmp;
cmark_strbuf *man = state->man;
int list_number;
- const char *url;
bool entering = (ev_type == CMARK_EVENT_ENTER);
if (state->plain == node) { // back at original node
@@ -204,8 +203,8 @@ S_render_node(cmark_node *node, cmark_event_type ev_type, void *vstate)
case CMARK_NODE_LINK:
if (!entering) {
- url = cmark_node_get_url(node);
- cmark_strbuf_printf(man, " (%s)", url);
+ cmark_strbuf_printf(man, " (%s)",
+ cmark_node_get_url(node));
}
break;