Skip to content

Commit a954c17

Browse files
committed
Fix rule reference links with multiple spaces
This fixes it so that rule links work correctly if there is more than one space in a reference definition.
1 parent ea629b4 commit a954c17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mdbook-spec/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static ADMONITION_RE: Lazy<Regex> = Lazy::new(|| {
2727

2828
/// A primitive regex to find link reference definitions.
2929
static MD_LINK_REFERENCE_DEFINITION: Lazy<Regex> =
30-
Lazy::new(|| Regex::new(r"(?m)^\[(?<label>[^]]+)]: (?<dest>.*)").unwrap());
30+
Lazy::new(|| Regex::new(r"(?m)^\[(?<label>[^]]+)]: +(?<dest>.*)").unwrap());
3131

3232
pub fn handle_preprocessing() -> Result<(), Error> {
3333
let pre = Spec::new(None)?;

0 commit comments

Comments
 (0)