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

HTML turns into HTFumo #3

Open
Chooks22 opened this issue May 20, 2024 · 2 comments · May be fixed by #4
Open

HTML turns into HTFumo #3

Chooks22 opened this issue May 20, 2024 · 2 comments · May be fixed by #4

Comments

@Chooks22
Copy link

It's funny and caught me off guard lol, but since I work in web dev it might get annoying/confusing in the long run

Page in question: https://stackoverflow.com/questions/7050586/how-to-use-inline-javascript-in-html

@astral4
Copy link
Owner

astral4 commented May 21, 2024

I think this is a good point. I thought it would be a funny side effect, but I have also seen words containing "ML" or "AI" be replaced often enough that it can be annoying. Some examples include HTML, XML, and YAML.

One way to fix this would be to additionally match trailing spaces before or after the terms "AI" and "ML". Another way would be to let users add or remove terms. I am leaning towards the second approach because it would also address #1.

@PotatoCider
Copy link
Contributor

PotatoCider commented May 21, 2024

We could do this with regex word boundaries like \bML\b, since the key of the replacement dictionary is passed into a regex replace.

Nevermind, this would be problematic since the added plural terms would produce an additional \bML\bs term.

Actually, the added \bML\bs term would be ignored this regex is impossible to match. So this would be a valid solution.

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 a pull request may close this issue.

3 participants