fixup! parser: allow linebreak in text of link tag refs
This commit is contained in:
parent
6cf5aca1e3
commit
2e992f5726
1 changed files with 5 additions and 1 deletions
|
@ -441,9 +441,13 @@ impl<'s> Parser<'s> {
|
|||
SpanLinkType::Inline,
|
||||
),
|
||||
inline::Container::ReferenceLink | inline::Container::ReferenceImage => {
|
||||
let tag = match self.inlines.src(inline.span) {
|
||||
CowStr::Owned(s) => s.replace('\n', " ").into(),
|
||||
s @ CowStr::Borrowed(_) => s,
|
||||
};
|
||||
let (url, attrs_def) = self
|
||||
.link_definitions
|
||||
.get(self.inlines.src(inline.span).replace('\n', " ").as_str())
|
||||
.get(tag.as_ref())
|
||||
.cloned()
|
||||
.unwrap_or_else(|| ("".into(), Attributes::new()));
|
||||
attributes.union(attrs_def);
|
||||
|
|
Loading…
Reference in a new issue