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
Some dfns are case-sensitive #625
Comments
What's weird is that it doesn't lowercase everything. Maybe just dfn-type definitions? |
It's dfn-types and a few more: https://github.com/tabatkins/bikeshed/blob/master/bikeshed/config.py#L94 Can you elaborate more on what you're defining here? "dfn" types definitions are generally English, where casing can vary unpredictably. (In particular, a term appearing at the start of a sentence will be uppercased, and shouldn't require extra effort to link.) From the diff, it looks like HTML switched from an English-style name to a pseudocodish CappedAlgorithmName. Maybe this means I should introduce an "algorithm" definition type, for this kind of "coding in English" function thing? (Bonus: if I can tie this into the existing "algorithm" concept Bikeshed has, for scoping the use-checking of (I don't want to change the behavior of dfn-type definitions here, even to something innocuous like "just lowercase during matching, preserve the original case when displaying", because you can start a sentence with a |
A new dfn type sounds pretty reasonable to me. We'd add some data attribute to the dfn for Bikeshed to become aware of it? Alternately I guess a data attribute that says "preserve case", in case there are other non-algorithm use cases where this is important. And yeah, it makes sense to lowercase things to allow people to use |
It gets a little weird if your dfn has abbreviations and such in it. You can also use But I'm okay with trying to make algorithms work. But let's call it "abstract operation" then, shortened "ao" by the ECMAScript folks. |
Ok, added an "abstract-op" type. I'm planning on turning the "dfn" type into a supertype, encompassing a new "term" type (the old "dfn", for ordinary English terms) and "abstract-op". That way linking with a plain |
Never mind, changing the link type fucks things up pretty deeply, and it turns out that mixing types with different capitalization rules into a supertype is not a good idea. |
We started introducing dfns in HTML for which casing matters. E.g., StructuredClone. @domenic noticed a problem with bikeshed lowercasing dfns here: whatwg/url@7b40216#commitcomment-16540044. Can that be changed somehow?
The text was updated successfully, but these errors were encountered: