From 7c44ac85bfa68e756d9a32635b114444512b683d Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 8 Nov 2014 12:18:04 -0800 Subject: Fixed backslash-escape inside link label. Down to 8 failures, all cases where the spec will need to be changed to reflect lack of priority of links over emphasis. --- src/inlines.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/inlines.c b/src/inlines.c index a3d848d..4628e32 100644 --- a/src/inlines.c +++ b/src/inlines.c @@ -607,8 +607,9 @@ static int link_label(subject* subj, chunk *raw_label) if (ispunct(peek_char(subj))) { advance(subj); } + } else { + advance(subj); } - advance(subj); } if (c == ']') { // match found @@ -699,7 +700,12 @@ static node_inl* handle_close_bracket(subject* subj, node_inl **last) raw_label = chunk_dup(&subj->input, ostack->position, initial_pos - ostack->position - 1); } - ref = reference_lookup(subj->refmap, &raw_label); + // TODO - document this hard length limit in READE; also impose for creation of refs + if (raw_label.len < 1000) { + ref = reference_lookup(subj->refmap, &raw_label); + } else { + ref = NULL; + } chunk_free(&raw_label); if (ref != NULL) { // found -- cgit v1.2.3