Make some methods/fields public
This commit is contained in:
parent
96a606d78c
commit
d9d36078f1
@ -132,7 +132,7 @@ pub struct CollectionState {
|
||||
}
|
||||
|
||||
pub struct Collection {
|
||||
pub(crate) storage: SqliteStorage,
|
||||
pub storage: SqliteStorage,
|
||||
#[allow(dead_code)]
|
||||
pub(crate) col_path: PathBuf,
|
||||
pub(crate) media_folder: PathBuf,
|
||||
|
@ -158,7 +158,7 @@ impl Collection {
|
||||
}
|
||||
|
||||
impl Collection {
|
||||
pub(crate) fn get_deck(&mut self, did: DeckId) -> Result<Option<Arc<Deck>>> {
|
||||
pub fn get_deck(&mut self, did: DeckId) -> Result<Option<Arc<Deck>>> {
|
||||
if let Some(deck) = self.state.deck_cache.get(&did) {
|
||||
return Ok(Some(deck.clone()));
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ lazy_static! {
|
||||
"#
|
||||
).unwrap();
|
||||
|
||||
pub(crate) static ref HTML_MEDIA_TAGS: Regex = Regex::new(
|
||||
pub static ref HTML_MEDIA_TAGS: Regex = Regex::new(
|
||||
r#"(?xsi)
|
||||
# the start of the image, audio, or object tag
|
||||
<\b(?:img|audio|object)\b[^>]+\b(?:src|data)\b=
|
||||
@ -284,7 +284,7 @@ pub(crate) fn extract_media_refs(text: &str) -> Vec<MediaRef> {
|
||||
|
||||
/// Calls `replacer` for every media reference in `text`, and optionally
|
||||
/// replaces it with something else. [None] if no reference was found.
|
||||
pub(crate) fn replace_media_refs(
|
||||
pub fn replace_media_refs(
|
||||
text: &str,
|
||||
mut replacer: impl FnMut(&str) -> Option<String>,
|
||||
) -> Option<String> {
|
||||
|
Loading…
Reference in New Issue
Block a user