diff --git a/NSAttributedString+Markdown.m b/NSAttributedString+Markdown.m index 7dc2893..f81de09 100644 --- a/NSAttributedString+Markdown.m +++ b/NSAttributedString+Markdown.m @@ -471,12 +471,11 @@ static void updateAttributedString(NSMutableAttributedString *result, NSString * NSURL *URL = [NSURL URLWithString:inlineLink]; if (URL) { replacementString = linkText; + NSMutableDictionary *dict = [@{ NSLinkAttributeName: URL } mutableCopy]; if (styleAttributes[MarkdownStyleLink]) { - replacementAttributes = styleAttributes[MarkdownStyleLink]; - } - else { - replacementAttributes = @{ NSLinkAttributeName: URL }; + [dict addEntriesFromDictionary:styleAttributes[MarkdownStyleLink]]; } + replacementAttributes = [dict copy]; replaceMarkers = YES; } }