summaryrefslogtreecommitdiffstats
path: root/vendor/mdbook/src/utils
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
commitdc0db358abe19481e475e10c32149b53370f1a1c (patch)
treeab8ce99c4b255ce46f99ef402c27916055b899ee /vendor/mdbook/src/utils
parentReleasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff)
downloadrustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz
rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/mdbook/src/utils')
-rw-r--r--vendor/mdbook/src/utils/fs.rs35
-rw-r--r--vendor/mdbook/src/utils/mod.rs1
2 files changed, 17 insertions, 19 deletions
diff --git a/vendor/mdbook/src/utils/fs.rs b/vendor/mdbook/src/utils/fs.rs
index 67f7062db..8ad5aad8b 100644
--- a/vendor/mdbook/src/utils/fs.rs
+++ b/vendor/mdbook/src/utils/fs.rs
@@ -210,39 +210,36 @@ mod tests {
};
// Create a couple of files
- if let Err(err) = fs::File::create(&tmp.path().join("file.txt")) {
+ if let Err(err) = fs::File::create(tmp.path().join("file.txt")) {
panic!("Could not create file.txt: {}", err);
}
- if let Err(err) = fs::File::create(&tmp.path().join("file.md")) {
+ if let Err(err) = fs::File::create(tmp.path().join("file.md")) {
panic!("Could not create file.md: {}", err);
}
- if let Err(err) = fs::File::create(&tmp.path().join("file.png")) {
+ if let Err(err) = fs::File::create(tmp.path().join("file.png")) {
panic!("Could not create file.png: {}", err);
}
- if let Err(err) = fs::create_dir(&tmp.path().join("sub_dir")) {
+ if let Err(err) = fs::create_dir(tmp.path().join("sub_dir")) {
panic!("Could not create sub_dir: {}", err);
}
- if let Err(err) = fs::File::create(&tmp.path().join("sub_dir/file.png")) {
+ if let Err(err) = fs::File::create(tmp.path().join("sub_dir/file.png")) {
panic!("Could not create sub_dir/file.png: {}", err);
}
- if let Err(err) = fs::create_dir(&tmp.path().join("sub_dir_exists")) {
+ if let Err(err) = fs::create_dir(tmp.path().join("sub_dir_exists")) {
panic!("Could not create sub_dir_exists: {}", err);
}
- if let Err(err) = fs::File::create(&tmp.path().join("sub_dir_exists/file.txt")) {
+ if let Err(err) = fs::File::create(tmp.path().join("sub_dir_exists/file.txt")) {
panic!("Could not create sub_dir_exists/file.txt: {}", err);
}
- if let Err(err) = symlink(
- &tmp.path().join("file.png"),
- &tmp.path().join("symlink.png"),
- ) {
+ if let Err(err) = symlink(tmp.path().join("file.png"), tmp.path().join("symlink.png")) {
panic!("Could not symlink file.png: {}", err);
}
// Create output dir
- if let Err(err) = fs::create_dir(&tmp.path().join("output")) {
+ if let Err(err) = fs::create_dir(tmp.path().join("output")) {
panic!("Could not create output: {}", err);
}
- if let Err(err) = fs::create_dir(&tmp.path().join("output/sub_dir_exists")) {
+ if let Err(err) = fs::create_dir(tmp.path().join("output/sub_dir_exists")) {
panic!("Could not create output/sub_dir_exists: {}", err);
}
@@ -253,22 +250,22 @@ mod tests {
}
// Check if the correct files where created
- if !(&tmp.path().join("output/file.txt")).exists() {
+ if !tmp.path().join("output/file.txt").exists() {
panic!("output/file.txt should exist")
}
- if (&tmp.path().join("output/file.md")).exists() {
+ if tmp.path().join("output/file.md").exists() {
panic!("output/file.md should not exist")
}
- if !(&tmp.path().join("output/file.png")).exists() {
+ if !tmp.path().join("output/file.png").exists() {
panic!("output/file.png should exist")
}
- if !(&tmp.path().join("output/sub_dir/file.png")).exists() {
+ if !tmp.path().join("output/sub_dir/file.png").exists() {
panic!("output/sub_dir/file.png should exist")
}
- if !(&tmp.path().join("output/sub_dir_exists/file.txt")).exists() {
+ if !tmp.path().join("output/sub_dir_exists/file.txt").exists() {
panic!("output/sub_dir/file.png should exist")
}
- if !(&tmp.path().join("output/symlink.png")).exists() {
+ if !tmp.path().join("output/symlink.png").exists() {
panic!("output/symlink.png should exist")
}
}
diff --git a/vendor/mdbook/src/utils/mod.rs b/vendor/mdbook/src/utils/mod.rs
index 9f67deda7..9156916ea 100644
--- a/vendor/mdbook/src/utils/mod.rs
+++ b/vendor/mdbook/src/utils/mod.rs
@@ -183,6 +183,7 @@ pub fn new_cmark_parser(text: &str, curly_quotes: bool) -> Parser<'_, '_> {
opts.insert(Options::ENABLE_FOOTNOTES);
opts.insert(Options::ENABLE_STRIKETHROUGH);
opts.insert(Options::ENABLE_TASKLISTS);
+ opts.insert(Options::ENABLE_HEADING_ATTRIBUTES);
if curly_quotes {
opts.insert(Options::ENABLE_SMART_PUNCTUATION);
}