-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlib.rs
More file actions
58 lines (54 loc) · 1.85 KB
/
Copy pathlib.rs
File metadata and controls
58 lines (54 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! Library for normalizing Markdown tables and wrapping text.
//!
//! Modules:
//! - `html` for converting HTML tables.
//! - `table` for standardizing Markdown table alignment.
//! - `wrap` for paragraph wrapping.
//! - `lists` for renumbering ordered lists.
//! - `breaks` for thematizing horizontal rules.
//! - `ellipsis` for replacing textual ellipses.
//! - `fences` for issues with code block fences
//! - `footnotes` for converting bare footnote links.
//! - `headings` for standardizing Setext headings.
//! - `code_emphasis` for fixing emphasis adjoining inline code.
//! - `textproc` for token-based transformations.
//! - `process` for stream processing.
//! - `io` for file helpers.
#[macro_export]
macro_rules! lazy_regex {
($re:expr, $msg:expr $(,)?) => {
std::sync::LazyLock::new(|| regex::Regex::new($re).expect($msg))
};
}
pub mod breaks;
pub mod code_emphasis;
pub mod ellipsis;
pub mod fences;
pub mod footnotes;
pub(crate) mod frontmatter;
pub mod headings;
mod html;
pub mod io;
pub mod lists;
pub mod process;
mod reflow;
pub mod table;
pub mod textproc;
pub mod wrap;
#[deprecated(note = "this function is legacy; use `convert_html_tables` instead")]
#[must_use]
pub fn html_table_to_markdown(lines: &[String]) -> Vec<String> {
html::html_table_to_markdown(lines)
}
pub use breaks::{THEMATIC_BREAK_LEN, format_breaks};
pub use code_emphasis::fix_code_emphasis;
pub use ellipsis::replace_ellipsis;
pub use fences::{attach_orphan_specifiers, compress_fences};
pub use footnotes::convert_footnotes;
pub use headings::convert_setext_headings;
pub use html::convert_html_tables;
pub use io::{rewrite, rewrite_no_wrap};
pub use lists::renumber_lists;
pub use process::{Options, process_stream, process_stream_no_wrap, process_stream_opts};
pub use table::{reflow_table, split_cells};
pub use wrap::{Token, is_fence, tokenize_markdown, wrap_text};