krz/orgo
Lightning fast org-mode static site generator.
clone: git clone https://gitbay.org/krz/orgo.git
2eac492d17d6d5a1062e0cae8af31ad7c35dc76b
signed_unknown_key
author: Christian Cleberg <hello@cleberg.net> · 2026-08-23T05:13:13Z
committer: <noreply@github.com>
docs/guide/05-org-support.org | 1 - src/audit.rs | 4 +++- tests/constructs.rs | 13 ++++++++++--- tests/oracle.rs | 1 + 4 files changed, 14 insertions(+), 5 deletions(-) @@ -186,7 +186,6 @@ a build. | Macros ={{{name}}}=, radio targets | Literal text. | | Drawers other than =PROPERTIES= | Captured and dropped, including =LOGBOOK=. | | Non-HTML export blocks | Dropped entirely. | -| Entities =\alpha= | Literal text. | | =#+TODO:= sequences | Not read; the default keyword set is used. | | Planning lines, =: = fixed-width | Render as ordinary paragraphs. | @@ -345,7 +345,9 @@ impl Audit { self.count(Scope::Out, "LaTeX fragment", at); } if entity_ref(line) { - self.count(Scope::Out, "entity (\\name)", at); + // Rendered, and rendered as org renders it: `\alpha` becomes `α` in + // both exporters. `fixtures/audit-entities.org` holds the oracle to that. + self.count(Scope::In, "entity (\\name)", at); } for (marker, name) in [ ('*', "bold"), @@ -388,6 +388,7 @@ fn well_formed_fixtures_produce_no_diagnostics() { "timestamps.org", "images.org", "tblfm.org", + "audit-entities.org", ] { let document = parse_fixture(name); assert!( @@ -792,13 +793,19 @@ fn audit_ignores_backslashes_that_are_not_entities() { ); } -/// A bare entity outside verbatim still counts. +/// A bare entity outside verbatim still counts, and counts as supported: `\alpha` +/// becomes `α` in orgo exactly as in Emacs, which the oracle checks on this same +/// fixture. The 412 names come from org's own `org-entities`. #[test] fn audit_counts_real_entities() { let report = audit_fixture("audit-entities.org"); + let line = report + .lines() + .find(|l| l.contains("entity (\\name)")) + .expect("a real entity is counted"); assert!( - report.contains("entity (\\name)"), - "a real entity was not counted:\n{report}" + line.starts_with("IN "), + "an entity orgo renders exactly as Emacs does must not read as a gap:\n{line}" ); } @@ -629,6 +629,7 @@ fn every_divergence_from_emacs_is_deliberate() { "images.org", "elements.org", "tblfm.org", + "audit-entities.org", ]; let mut offenders = Vec::new(); for fixture in fixtures {