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

Handle Initial Integers in Ingredient type Headline DomId generation #3004

Open
lassediercks opened this issue Sep 2, 2024 · 1 comment
Open

Comments

@lassediercks
Copy link

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

There is no technical implication, only a spec compliance issue.

According to the html spec id's must start with a letter. Given a Content Editor uses the Headline Ingredient to write something like: 1. How to photograph an elk the autogenerated domId would be 1-how-to-photograph-an-elk

howto.com/photo/guides#1-how-to-photograph-an-elk works though and also using an anchor link like

<a href="#1-how-to-photograph-an-elk#>Elk</a>

does work properly

Describe the solution you'd like

I'd expect alchemy Ingredient type Headline to convert integers to the word.

e.g.
1-how-to-photograph-an-elk would become one-how-to-photograph-an-elk

Describe alternatives you've considered

An alternative could be to just remove the integers from the domId

@lassediercks lassediercks changed the title Handle Initial Integers in Ingredient type Headline Handle Initial Integers in Ingredient type Headline DomId generation Sep 2, 2024
@tvdeyen
Copy link
Member

tvdeyen commented Sep 2, 2024

For the sake of simplicity to fix this edge case I think removing leading numbers would be the best option here. Converting numbers to words would make it necessary to do it in a localization aware way. Because 1 is converted to one, eins, uno or une etc... dependent from the locale of the page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants