Open aaranxu opened 8 years ago
I have just tried to modified the source code like as follows, but it hasn't worked yet:
let reference_link = Regex::new(r"(?x)
(
\[
(?P<words>
(?:
\[[^\]]*\]
|
[^\[]
)*
)
\]
\s?
(?:\n\s*)?
\[
(?P<id>.+?)
\]
)|(
(?P<head>
(?:[^\]]|^)\s?(?:\n\s*)?
)
\[
(?P<wordsaa>
[^\[\]]+
)
\]
(?P<tail>
(?:\s{1}(?:[^\[\(]|$))
)
)
").unwrap();
let reference_link_shortcut = Regex::new(r"(?x)
(?P<head>
(?:[^\]]|^)\s?(?:\n\s*)?
)
\[
(?P<id>
[^\[\]]+
)
\]
(?P<tail>
(?:\s?(?:[^\[\(]|$))
)
").unwrap();
See the links format of Markdown.
When I put the current docs of the official Rust source, I found there were some incorrect results on references link that is
[ref]
style in the original book, such as some[references]
s rather than[references][references]
s occurred in the article primitive types.I have looked up the src of the tool and found the issue was on the
/src/helpers/adjust_reference_names.rs
that could not dealt with all kinds of references links:The code just works on unique style of the references links.