replace spaces by dashes
This commit is contained in:
parent
b20e82bc4c
commit
1fd7175e56
1 changed files with 7 additions and 1 deletions
|
@ -61,7 +61,13 @@ pub fn get_options(path: Option<FilePath>, metadata_type: MType) -> ComrakOption
|
||||||
.superscript(true)
|
.superscript(true)
|
||||||
.header_ids(match path {
|
.header_ids(match path {
|
||||||
Some(ref fp) => {
|
Some(ref fp) => {
|
||||||
format!("{}-", fp.path.get(..fp.path.len() - 3).unwrap_or_default())
|
format!(
|
||||||
|
"{}-",
|
||||||
|
fp.path
|
||||||
|
.get(..fp.path.len() - 3)
|
||||||
|
.unwrap_or_default()
|
||||||
|
.replace(' ', "-")
|
||||||
|
)
|
||||||
}
|
}
|
||||||
None => String::new(),
|
None => String::new(),
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue