annatomic 0.4.0

The Annatomic annotation editor is intended to be used for the [RIDGES corpus](https://www.linguistik.hu-berlin.de/en/institut-en/professuren-en/korpuslinguistik/research/ridges-projekt). It is based on [graphANNIS](https://github.com/korpling/graphANNIS) and thus is internal data model is in principle suitable for a wide range of annotation concepts. "
Documentation
#[cfg(test)]
pub(crate) mod example_generator;
pub(crate) mod token_helper;

pub(crate) fn make_whitespace_visible<S: AsRef<str>>(v: S) -> String {
    let result: String = v
        .as_ref()
        .chars()
        .map(|c| match c {
            ' ' => '',
            '\n' => '',
            _ => c,
        })
        .collect();
    result
}

/// Remove the module configuration part (format and path) from the config.
///
/// E.g.
///
/// ```toml
/// format = "graphml"
/// path = "mypath"
///
/// [config]
/// param = true
/// ```
///
/// would become
///
/// ```toml
/// param = true
/// ```
pub(crate) fn strip_module_header(full_config: &str) -> anyhow::Result<String> {
    let parsed = toml::from_str::<toml::Table>(full_config)?;
    if let Some(config) = parsed.get("config") {
        let result = toml::to_string_pretty(config)?;
        Ok(result)
    } else {
        Ok("".to_string())
    }
}