aboutsummaryrefslogtreecommitdiffstats
path: root/generate
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-12-13 12:57:14 +0400
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-12-13 12:57:14 +0400
commitff5f81498ba1807ab06ffb5dadb1c99c102e0284 (patch)
tree4c19b6daaac3b4857022f724005095474ed35b45 /generate
parent60410a42e46d97e3581493c9d185184b7fd87bb5 (diff)
downloadmarkdown-rs-ff5f81498ba1807ab06ffb5dadb1c99c102e0284.tar.gz
markdown-rs-ff5f81498ba1807ab06ffb5dadb1c99c102e0284.tar.bz2
markdown-rs-ff5f81498ba1807ab06ffb5dadb1c99c102e0284.zip
Replace build script with private crate
Closes GH-34. Closes GH-35.
Diffstat (limited to '')
-rw-r--r--generate/Cargo.toml11
-rw-r--r--generate/src/main.rs (renamed from build.rs)10
2 files changed, 19 insertions, 2 deletions
diff --git a/generate/Cargo.toml b/generate/Cargo.toml
new file mode 100644
index 0000000..7a2cf63
--- /dev/null
+++ b/generate/Cargo.toml
@@ -0,0 +1,11 @@
+[package]
+name = "markdown-generate"
+version = "0.0.0"
+authors = ["Titus Wormer <tituswormer@gmail.com>"]
+edition = "2018"
+publish = false
+
+[dependencies]
+regex = "1"
+reqwest = "0.11"
+tokio = { version = "1", features = ["full"] }
diff --git a/build.rs b/generate/src/main.rs
index 658cb0a..9f0d14b 100644
--- a/build.rs
+++ b/generate/src/main.rs
@@ -1,3 +1,9 @@
+// To regenerate, run the following from the repository root:
+//
+// ```sh
+// cargo run --manifest-path generate/Cargo.toml
+// ```
+
use regex::Regex;
use std::fs;
@@ -63,7 +69,7 @@ async fn commonmark() {
let doc = format!(
"//! `CommonMark` test suite.
-// > 👉 **Important**: this module is generated by `build.rs`.
+// > 👉 **Important**: this module is generated by `generate/src/main.rs`.
// > It is generate from the latest CommonMark website.
use markdown::{{to_html_with_options, CompileOptions, Options}};
@@ -130,7 +136,7 @@ async fn punctuation() {
/// List of characters that are considered punctuation.
///
-/// > 👉 **Important**: this module is generated by `build.rs`.
+/// > 👉 **Important**: this module is generated by `generate/src/main.rs`.
/// > It is generate from the latest Unicode data.
///
/// Rust does not contain an `is_punctuation` method on `char`, while it does