Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Exclude lines that match a regex #318

Open
reitzig opened this issue Dec 20, 2023 · 0 comments
Open

Feature: Exclude lines that match a regex #318

reitzig opened this issue Dec 20, 2023 · 0 comments
Labels
feature a feature which should be implemented

Comments

@reitzig
Copy link

reitzig commented Dec 20, 2023

As a writer of AsciiDoc files, I want to be able to limit line length overall but exclude lines I can not shorten, e.g. links with long URLs.

Problem: AsciiDoc supports only line comments, not trailing comments (cf. asciidoctor/asciidoctor#991).

Proposal: Support excluding lines (in certain files) if they match a regular expression. Extend the exclude list to support

Example usage (for this use case):

.ecrc

{
    "exclude": [
        {
            "files": ["*.adoc"],
            "lines": ["^\\s*link:"]
        }
    ]
}

(not married to the syntax; I'd image one would like to migrate from string elements like "*.lock" to { files: ["*.lock"] } eventually?)

I would have to test w.r.t. performance impact; but since this is a strictly opt-in feature, the trade-off would be the users'.

@per1234 per1234 added the feature a feature which should be implemented label Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature which should be implemented
Projects
None yet
Development

No branches or pull requests

2 participants