Skip to content

Guard against horizontal-rule section dividers; remove from 8 posts - #90

Merged
rivassec merged 2 commits into
mainfrom
guard/no-section-dividers
Oct 10, 2026
Merged

rivassec merged 2 commits into
mainfrom
guard/no-section-dividers

Conversation

@rivassec

Copy link
Copy Markdown
Owner

Summary

  • Add scripts/check_section_dividers.py (stdlib, same CLI/exit codes/error format as the em-dash guard): flags CommonMark thematic breaks and setext --- underlines in post bodies; skips frontmatter, fenced code, tables, list items. Excludes content/tools/** (vendored) and content/pages/about.md (regenerated by scripts/fetch_about.sh at deploy).
  • Wire it as a pre-commit hook and .github/workflows/section-divider-check.yml.
  • Unit tests in tests/test_check_section_dividers.py (20 tests).
  • Remove the 50 dividers from 8 posts (headings-only house style). Text and frontmatter unchanged.

Test plan

  • Tests failed before the script existed, pass after
  • Guard reports exactly the 50 dividers pre-cleanup, 0 after
  • Other check_*.py guards and full unittest suite pass locally
  • Built site: 0 <hr in the 8 posts, <h2 counts unchanged vs origin/main

🤖 Generated with Claude Code

https://claude.ai/code/session_01JoTNmbmc8o4TJDUGG2gd3P

rivassec and others added 2 commits October 9, 2026 22:40
scripts/check_section_dividers.py flags CommonMark thematic breaks (and
setext --- underlines) in post bodies, skipping frontmatter, fenced code,
tables and list items. Wired as a pre-commit hook and a CI workflow, with
unit tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JoTNmbmc8o4TJDUGG2gd3P
Match the house style of separating sections with headings only (50
dividers removed; text and frontmatter unchanged).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JoTNmbmc8o4TJDUGG2gd3P
@rivassec
rivassec merged commit a820c94 into main Oct 10, 2026
20 checks passed
@rivassec
rivassec deleted the guard/no-section-dividers branch October 10, 2026 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant