pub mod config;
#[cfg(any(feature = "egui-backend", feature = "webview-backend"))]
pub mod icon;
pub mod image_validation;
#[cfg(feature = "webview-backend")]
pub mod markdown;
pub mod mermaid;
#[cfg(any(feature = "egui-backend", feature = "webview-backend"))]
pub mod net;
pub mod paths;
#[cfg(feature = "webview-backend")]
pub mod sanitize;
pub mod slug;
pub mod toc;
pub mod watcher;
use std::sync::atomic::{AtomicBool, Ordering};
static VERBOSE: AtomicBool = AtomicBool::new(false);
pub fn set_verbose(v: bool) {
VERBOSE.store(v, Ordering::Relaxed);
}
pub fn verbose() -> bool {
VERBOSE.load(Ordering::Relaxed)
}
static OFFLINE: AtomicBool = AtomicBool::new(false);
pub fn set_offline(v: bool) {
OFFLINE.store(v, Ordering::Relaxed);
}
#[cfg(any(feature = "egui-backend", feature = "webview-backend"))]
pub fn offline() -> bool {
OFFLINE.load(Ordering::Relaxed)
}
#[macro_export]
macro_rules! vlog {
($($arg:tt)*) => {
if $crate::core::verbose() {
eprintln!("[mdr] {}", format!($($arg)*));
}
};
}