feat: gate a run of blocks to chosen output formats

This commit is contained in:
randogoth 2026-10-09 16:35:11 +03:00
parent bb7a5111a1
commit 603f29b0f0
9 changed files with 437 additions and 22 deletions

View file

@ -143,6 +143,9 @@ impl Writer {
// Alignment and pagination have no expression here. Unwrapping keeps
// the content; the presentation is simply not available.
Block::Aligned { block, .. } => self.block(block),
// Gates are filtered out before rendering; keeping the content is
// the harmless reading if one ever arrives here.
Block::Gated { block, .. } => self.block(block),
Block::CardBreak { .. } => {}
// Raw markup would be shown literally, which is worse than omitting it.
Block::Html(_) => {}