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

New Editor Idea: html_unlink #205

Closed
EdJoPaTo opened this issue Sep 5, 2024 · 0 comments · Fixed by #206
Closed

New Editor Idea: html_unlink #205

EdJoPaTo opened this issue Sep 5, 2024 · 0 comments · Fixed by #206
Labels
enhancement New feature or request

Comments

@EdJoPaTo
Copy link
Owner

EdJoPaTo commented Sep 5, 2024

Is your feature request related to a problem? Please describe.

Sometimes there is a bunch of links in something that are kind of pointless to keep.
<a href="javascript:…"> or <a href="#"> are such examples. Especially clickable headlines with a #id can be annoying in markdown results. It should be possible to remove them keeping their content.

<div><a href="#"><h3>Something</h3></a></div> should become <div><h3>Something</h3></div>.

Describe the solution you'd like

For the editor I think something like this might work well: html_unlink: regex.
The regex would match with the href content and replace it.

Describe alternatives you've considered

Something like html_flatten: a[href^='#'] might also be neat replacing matching elements with their content.

@EdJoPaTo EdJoPaTo added the enhancement New feature or request label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant