Skip to content

Commit a87860c

Browse files
authored
Merge pull request #304 from CosmicHorrorDev/feature-doc-labels
Add in-doc labels for public facing features
2 parents 3e4c093 + 5593b7a commit a87860c

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ exclude = [
2121
resolver = "2"
2222
edition = "2018"
2323

24+
[package.metadata.docs.rs]
25+
all-features = true
26+
rustdoc-args = ["--cfg", "docsrs"]
27+
2428
[profile.release]
2529
lto = true
2630

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
//! # }
6060
//! ```
6161
62+
#![cfg_attr(docsrs, feature(doc_cfg))]
6263
#![deny(
6364
missing_docs,
6465
missing_debug_implementations,

src/parser/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,8 @@ pub struct ComrakExtensionOptions {
329329
pub front_matter_delimiter: Option<String>,
330330

331331
#[cfg(feature = "shortcodes")]
332-
/// Available if "shortcodes" feature is enabled. Phrases wrapped inside of ':' blocks will be
333-
/// replaced with emojis.
332+
#[cfg_attr(docsrs, doc(cfg(feature = "shortcodes")))]
333+
/// Phrases wrapped inside of ':' blocks will be replaced with emojis.
334334
///
335335
/// ```
336336
/// # use comrak::{markdown_to_html, ComrakOptions};

src/plugins/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//! Plugins for enhancing the default implementation of comrak can be defined in this module.
22
33
#[cfg(feature = "syntect")]
4+
#[cfg_attr(docsrs, doc(cfg(feature = "syntect")))]
45
pub mod syntect;

0 commit comments

Comments
 (0)