summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-11-08 12:18:04 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-11-09 13:21:37 -0800
commit7c44ac85bfa68e756d9a32635b114444512b683d (patch)
tree8f096fc43f74ddd5cb0a44d7c8c0b9e46357583b
parentc6f95684f90a4d1efd2185984b1aa2931591efb4 (diff)
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.
-rw-r--r--src/inlines.c10
1 files changed, 8 insertions, 2 deletions
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