Skip to content

Enable ignoring HTML classes - #15

Merged
mdbrnowski merged 2 commits into
mainfrom
ignore-classes
Jul 22, 2026
Merged

Enable ignoring HTML classes#15
mdbrnowski merged 2 commits into
mainfrom
ignore-classes

Conversation

@mdbrnowski

@mdbrnowski mdbrnowski commented Jul 22, 2026

Copy link
Copy Markdown
Owner

This PR adds support for ignoring all HTML class attributes during content comparison, controlled by a new ignore_classes option in the configuration.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an ignore_classes option to HTML normalization so that content comparison can ignore all HTML class attributes on remaining elements (after applying ignore selectors), enabling more stable diffs for class-heavy pages.

Changes:

  • Extend page configuration to include ignore_classes (parsed from TOML, defaulting to False).
  • Thread ignore_classes through the Gleam server code into the Elixir/Floki HTML normalization implementation.
  • Update and add tests to cover both class-stripping and non-stripping behavior.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/server_test.gleam Updates comparable-content tests for the new parameter; adds coverage for class stripping on/off.
src/ciele/server.gleam Threads ignore_classes into comparable content generation; updates public API arity.
src/ciele/html.ex Implements conditional stripping of class attributes via Floki traversal.
src/ciele/config.gleam Extends Page config/type and TOML parsing to support ignore_classes.
gleam.toml Bumps package version.
config/config.example.toml Demonstrates the new ignore_classes configuration option.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread gleam.toml
Comment thread src/ciele/config.gleam Outdated
Comment thread src/ciele/server.gleam
@mdbrnowski
mdbrnowski merged commit 2dca8c0 into main Jul 22, 2026
1 check passed
@mdbrnowski
mdbrnowski deleted the ignore-classes branch July 22, 2026 18:01
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.

2 participants