Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/acknowledgement/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,21 @@ impl Acknowledgements {
pub fn listing() -> Acknowledgements {
syntect::dumps::from_binary(include_bytes!("../../generated/acknowledgements_full.bin",))
}

/// Returns a link to a page listing acknowledgements for all syntax and theme definitions
///
/// Available without having to bundle all of the acknowledgement info in your binary
///
/// ```
/// assert_eq!(
/// two_face::acknowledgement::url(),
/// "https://github.com/CosmicHorrorDev/two-face/blob/v0.4.4/generated/acknowledgements_full.md"
/// );
/// ```
pub const fn url() -> &'static str {
concat!(
"https://github.com/CosmicHorrorDev/two-face/blob/v",
env!("CARGO_PKG_VERSION"),
"/generated/acknowledgements_full.md",
)
}
7 changes: 2 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,9 @@ two-face = { version = ..., default-features = false, features = ["syntect-fancy
/// "https://github.com/CosmicHorrorDev/two-face/blob/v0.4.4/generated/acknowledgements_full.md"
/// );
/// ```
#[deprecated(since = "0.4.5", note = "Moved to `two_face::acknowledgement::url()`")]
pub fn acknowledgement_url() -> &'static str {
concat!(
"https://github.com/CosmicHorrorDev/two-face/blob/v",
env!("CARGO_PKG_VERSION"),
"/generated/acknowledgements_full.md",
)
acknowledgement::url()
}

// TODO: add more extensive tests later
Expand Down