Skip to content

Commit 7bcdfe6

Browse files
committed
Finish move of summary to mdbook-summary
This updates everything for the move of summary to mdbook-summary. There will be followup commits that will be doing more cleanup here.
1 parent 29f936b commit 7bcdfe6

File tree

6 files changed

+20
-4
lines changed

6 files changed

+20
-4
lines changed

Cargo.lock

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ anyhow = "1.0.98"
2525
log = "0.4.27"
2626
mdbook-core = { path = "crates/mdbook-core" }
2727
mdbook-summary = { path = "crates/mdbook-summary" }
28+
memchr = "2.7.5"
2829
pulldown-cmark = { version = "0.10.3", default-features = false, features = ["html"] } # Do not update, part of the public api.
2930
regex = "1.11.1"
3031
serde = { version = "1.0.219", features = ["derive"] }
@@ -60,7 +61,8 @@ handlebars = "6.0"
6061
hex = "0.4.3"
6162
log.workspace = true
6263
mdbook-core.workspace = true
63-
memchr = "2.5.0"
64+
mdbook-summary.workspace = true
65+
memchr.workspace = true
6466
opener = "0.8.1"
6567
pulldown-cmark.workspace = true
6668
regex.workspace = true

crates/mdbook-summary/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ repository.workspace = true
88
rust-version.workspace = true
99

1010
[dependencies]
11+
anyhow.workspace = true
12+
log.workspace = true
13+
memchr.workspace = true
14+
pulldown-cmark.workspace = true
15+
serde.workspace = true
1116

1217
[lints]
1318
workspace = true

crates/mdbook-summary/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Summary parser for mdBook.
2+
13
use anyhow::{Context, Error, Result, bail};
24
use log::{debug, trace, warn};
35
use memchr::Memchr;

src/book/book.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ use std::fs::{self, File};
44
use std::io::{Read, Write};
55
use std::path::{Path, PathBuf};
66

7-
use super::summary::{Link, SectionNumber, Summary, SummaryItem, parse_summary};
87
use anyhow::{Context, Result};
98
use log::debug;
109
use mdbook_core::config::BuildConfig;
1110
use mdbook_core::utils::bracket_escape;
11+
use mdbook_summary::{Link, SectionNumber, Summary, SummaryItem, parse_summary};
1212
use serde::{Deserialize, Serialize};
1313

1414
/// Load a book into memory from its `src/` directory.

src/book/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,15 @@
77
88
mod book;
99
mod init;
10-
mod summary;
1110

1211
pub use self::book::{Book, BookItem, BookItems, Chapter, load_book};
1312
pub use self::init::BookBuilder;
14-
pub use self::summary::{Link, SectionNumber, Summary, SummaryItem, parse_summary};
1513

1614
use anyhow::{Context, Error, Result, bail};
1715
use log::{debug, error, info, log_enabled, trace, warn};
1816
use mdbook_core::config::{Config, RustEdition};
1917
use mdbook_core::utils;
18+
pub use mdbook_summary::{Link, SectionNumber, Summary, SummaryItem, parse_summary};
2019
use std::ffi::OsString;
2120
use std::io::{IsTerminal, Write};
2221
use std::path::{Path, PathBuf};

0 commit comments

Comments
 (0)