-
Notifications
You must be signed in to change notification settings - Fork 30k
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
doc: fix links order in Assert doc #5074
Conversation
Sort links in lexical order
@@ -409,3 +408,4 @@ assert.throws( | |||
[`Error`]: errors.html#errors_class_error | |||
[`RegExp`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions | |||
[`TypeError`]: errors.html#errors_class_typeerror | |||
[Locked]: documentation.html#documentation_stability_index |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this come just before RegExp
if it is in lexical (aka alphabetical) order?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DavidTPate lexicographic !== alphabetic from what I know
Like: lexical (lexicographic) ⊃ alphabetical
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something just doesn't seem right, Lexicographic on Wikipedia for example.
the lexicographic or lexicographical order (also known as lexical order, dictionary order, alphabetical order or lexicographic(al) product) is a generalization of the way the alphabetical order of words is based on the alphabetical order of their component letters.
This isn't ordered by the ASCII values as A
(#65) comes before a
(#97) in ASCII values. As an example:
['Locked', 'assert.deepEqual()', 'assert.deepStrictEqual()', 'assert.ok()','Error','RegExp', 'TypeError'].sort();
// ["Error", "Locked", "RegExp", "TypeError", "assert.deepEqual()", "assert.deepStrictEqual()", "assert.ok()"]
'RegExp' > 'Locked';
// true
I'm not trying to hold this PR up, just lost as to how this ordering occurred and wondering if the other PRs are in an odd order as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes, talking about case - I used case-insensitive check. So talking about alphabet
, I used case-insensitive one. 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It all started with #5003, so I assumed, this is a good way to go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, maybe that's me who misunderstands lex and alphabetical order...
LGTM |
Hmm, this one is borderline of being unneccessary in my eyes. Do links in other docs conform to a sorting? Maybe handle them all in one PR here? |
@silverwind I'm ok with that |
I'll close this one then as it barely has any value, if you wanna do it for all docs, follow up with a new one 😉 |
Sort links in lexical order