Skip to content

Detect roles that start with !~ - #146

Merged
JulienPalard merged 4 commits into
sphinx-contrib:mainfrom
mushitoriami:detect-exclamation-and-tilde
Nov 7, 2025
Merged

JulienPalard merged 4 commits into
sphinx-contrib:mainfrom
mushitoriami:detect-exclamation-and-tilde

Conversation

@mushitoriami

Copy link
Copy Markdown
Contributor

This PR adds logic to detect roles that start with !~, which are not rendered correctly.

closes: gh-126

@JulienPalard

Copy link
Copy Markdown
Collaborator

I missed you had implemented it so I did it on my side too, sorry.

Comparing your implem and mine: #150 looks like I'm detecting !~ and ~!, do you think it's an interesting feature to keep?

@mushitoriami

Copy link
Copy Markdown
Contributor Author

@JulienPalard ~! doesn't work as expected either, so it makes sense to detect it as well.

@JulienPalard

Copy link
Copy Markdown
Collaborator

I'd gladly merge your PR if you'd like your first PR here to be merged, if you're short in time I'll merge mine, just tell me.

@mushitoriami

Copy link
Copy Markdown
Contributor Author

@JulienPalard Thanks. If it's fine, I’d be happy to have my first PR merged here.

@JulienPalard

Copy link
Copy Markdown
Collaborator

Then you can tweak it to spot ~! and !~, don't hesitate to steal my regex (in #150).

@mushitoriami

Copy link
Copy Markdown
Contributor Author

@JulienPalard Just updated. It now detects both ~! and !~.

Comment thread sphinxlint/checkers.py Resolved
mushitoriami and others added 2 commits November 7, 2025 12:02
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>

@hugovk hugovk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

@JulienPalard
JulienPalard merged commit 833d320 into sphinx-contrib:main Nov 7, 2025
1 check passed
@JulienPalard

Copy link
Copy Markdown
Collaborator

Thanks! :)

@mushitoriami
mushitoriami deleted the detect-exclamation-and-tilde branch November 8, 2025 01:03
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.

Detect !~ in roles

3 participants