aboutsummaryrefslogtreecommitdiffstats
path: root/src/constant.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-06-13 12:37:25 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-06-13 12:37:25 +0200
commitefdf90959f78d1582da312bffbefaabb79f264b7 (patch)
treea36c7dfa72ec5cadfdb296d94aed2d06a871b701 /src/constant.rs
parent17f4eec55ad0a5f74aedbcff6c2f0119ad52e584 (diff)
downloadmarkdown-rs-efdf90959f78d1582da312bffbefaabb79f264b7.tar.gz
markdown-rs-efdf90959f78d1582da312bffbefaabb79f264b7.tar.bz2
markdown-rs-efdf90959f78d1582da312bffbefaabb79f264b7.zip
Add autolinks
Diffstat (limited to '')
-rw-r--r--src/constant.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/constant.rs b/src/constant.rs
index 332fdaf..c98c24d 100644
--- a/src/constant.rs
+++ b/src/constant.rs
@@ -27,6 +27,23 @@
/// [code_indented]: crate::construct::code_indented
pub const TAB_SIZE: usize = 4;
+/// The number of characters allowed in a protocol of an [autolink][].
+///
+/// The protocol part is the `xxx` in `<xxx://example.com>`.
+/// 32 characters is fine, 33 is too many.
+///
+/// [autolink]: crate::construct::autolink
+pub const AUTOLINK_SCHEME_SIZE_MAX: usize = 32;
+
+/// The number of characters allowed in a domain of an email [autolink][].
+///
+/// There can be multiple “domains”.
+/// A domain part is each `xxx` in `<example@xxx.xxx.xxx>`.
+/// 63 characters is fine, 64 is too many.
+///
+/// [autolink]: crate::construct::autolink
+pub const AUTOLINK_DOMAIN_SIZE_MAX: usize = 63;
+
/// The number of markers needed for a [thematic break][thematic_break] to form.
///
/// Like many things in markdown, the number is `3`.