Skip to main content

Module snapshot

Module snapshot 

Source
Expand description

Markdown normalization + content hashing. Single source of truth for the content_hash so cosmetic churn (trailing whitespace, blank-line runs, CRLF) never flips a page from same to changed.

Functionsยง

canonical_json_string
Serialize a JSON value with object keys sorted recursively. Deterministic regardless of input key order.
hash_json
Hex SHA-256 of a canonicalized JSON value (object keys sorted recursively), so logically-equal extractions with different key ordering hash equal.
hash_markdown
Hex SHA-256 of the normalized markdown.
hash_str
Hex SHA-256 of a string.
normalize_markdown
Normalize markdown before hashing/diffing: