Skip to content

feat(ui): replace rule inputs with textareas for multiline support#4268

Open
mtsz-pl wants to merge 1 commit into
miniflux:mainfrom
mtsz-pl:textarea
Open

feat(ui): replace rule inputs with textareas for multiline support#4268
mtsz-pl wants to merge 1 commit into
miniflux:mainfrom
mtsz-pl:textarea

Conversation

@mtsz-pl

@mtsz-pl mtsz-pl commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

It is valid to use multiple rules for feed processing, and textarea with multiline support is more suitable for display/editing, than single-lined input. All rules properly handle whitespaces and newlines, so there is no regression.

Have you followed these guidelines?

@fguillot fguillot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This change introduces a few regressions:

  • urlrewrite_rules: the backend still only accepts a single exact rewrite("..."|"...") expression. Any newline, including a trailing one, makes URL rewriting stop working.
  • scraper_rules: the backend still passes the whole value as one CSS selector. Newlines are treated as selector whitespace/descendant combinators, not as separate rules, so multiline input changes selector meaning instead of adding multiple rules.
  • blocklist_rules / keeplist_rules: these are still compiled as a single regex each. Newline-separated entries do not become multiple filters.

Only the rewrite_rules is safe because it uses text/scanner.

@mtsz-pl

mtsz-pl commented Apr 30, 2026

Copy link
Copy Markdown
Contributor Author

I have added tests for multiline rules and updated the code. I think all cases are covered.

@mtsz-pl mtsz-pl force-pushed the textarea branch 3 times, most recently from 735952c to beeec19 Compare May 8, 2026 20:44
It is valid to use multiple rules for feed processing, and textarea  with multiline support is more suitable for display/editing, than single-lined input. All rules properly handle whitespaces and newlines, so there is no regression.

# Conflicts:
#	internal/reader/scraper/scraper.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants