AttributedMarkdown
AttributedMarkdown copied to clipboard
Crashes when Emails included in markdown
When there are email adresses included in the document, markdown_output.m crashes.
case LINK:;
NSURL *url = [NSURL URLWithString:elt->contents.link->url];
if (url) {
NSDictionary *linkAttibutes = @{@"attributedMarkdownURL": url};
print_attr_element_list(out, elt->contents.link->label, attributes, merge(current, merge(attributes[elt->key], linkAttibutes)));
} else {
NSDictionary *attributesBroken = @{NSForegroundColorAttributeName: [TARGET_PLATFORM_COLOR redColor]}; // Make this attributes[BROKEN]
print_attr_element_list(out, elt->contents.link->label, attributes, merge(current, attributesBroken));
print_attr_string(out, [NSString stringWithFormat: @" (%@)", elt->contents.link->url], current);
}
break;
Hmm, my guess is that elt->contents.link->url is null here. Confirm?
Yes
You could probably get around the crash for now by inserting an empty string rather than a nil one for now.
Sent from my iPhone
On May 4, 2014, at 6:06 AM, joelfischerr [email protected] wrote:
Yes
— Reply to this email directly or view it on GitHub.