Skip to content

Commit

Permalink
Make bon builders optional
Browse files Browse the repository at this point in the history
Signed-off-by: Nico Burns <[email protected]>
  • Loading branch information
nicoburns authored and kivikakk committed Dec 18, 2024
1 parent 7c6b947 commit fcd44e9
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 51 deletions.
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,18 @@ shell-words = { version = "1.0", optional = true }
slug = "0.1.4"
emojis = { version = "0.6.2", optional = true }
arbitrary = { version = "1", optional = true, features = ["derive"] }
bon = "3"
bon = { version = "3", optional = true }
caseless = "0.2.1"

[dev-dependencies]
ntest = "0.9"
toml = "0.7.3"

[features]
default = ["cli", "syntect"]
default = ["cli", "syntect", "bon"]
cli = ["clap", "shell-words", "xdg"]
shortcodes = ["emojis"]
bon = ["dep:bon"]

[target.'cfg(all(not(windows), not(target_arch="wasm32")))'.dependencies]
xdg = { version = "^2.5", optional = true }
Expand Down
12 changes: 8 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,19 @@ pub use html::Anchorizer;
#[allow(deprecated)]
pub use parser::parse_document_with_broken_link_callback;
pub use parser::{
parse_document, BrokenLinkCallback, BrokenLinkReference, ExtensionOptions,
ExtensionOptionsBuilder, ListStyleType, Options, ParseOptions, ParseOptionsBuilder, Plugins,
PluginsBuilder, RenderOptions, RenderOptionsBuilder, RenderPlugins, RenderPluginsBuilder,
ResolvedReference, URLRewriter,
parse_document, BrokenLinkCallback, BrokenLinkReference, ExtensionOptions, ListStyleType,
Options, ParseOptions, Plugins, RenderOptions, RenderPlugins, ResolvedReference, URLRewriter,
};
pub use typed_arena::Arena;
pub use xml::format_document as format_xml;
pub use xml::format_document_with_plugins as format_xml_with_plugins;

#[cfg(feature = "bon")]
pub use parser::{
ExtensionOptionsBuilder, ParseOptionsBuilder, PluginsBuilder, RenderOptionsBuilder,
RenderPluginsBuilder,
};

/// Legacy naming of [`ExtensionOptions`]
pub type ComrakExtensionOptions<'c> = ExtensionOptions<'c>;
/// Legacy naming of [`Options`]
Expand Down
Loading

0 comments on commit fcd44e9

Please sign in to comment.