normalize_markdown

Function normalize_markdown 

Source
pub fn normalize_markdown(markdown: &str) -> String
Expand description

Normalizes markdown content by applying all preprocessing steps.

This function applies normalizations in the correct order:

  1. Strip Unicode bidirectional formatting characters

Note: Guillemet preprocessing (<<text>>«text») is handled separately in normalize_fields because it needs to be applied after schema defaults and coercion.

§Examples

use quillmark_core::normalize::normalize_markdown;

// Bidi characters are stripped
let input = "**bold** \u{202D}**more**";
let normalized = normalize_markdown(input);
assert_eq!(normalized, "**bold** **more**");