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

doc: fix links order in Assert doc #5074

Closed
wants to merge 1 commit into from
Closed

doc: fix links order in Assert doc #5074

wants to merge 1 commit into from

Conversation

estliberitas
Copy link
Contributor

Sort links in lexical order

Sort links in lexical order
@thefourtheye thefourtheye added assert Issues and PRs related to the assert subsystem. doc Issues and PRs related to the documentations. labels Feb 4, 2016
@@ -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

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?

Copy link
Contributor Author

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

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.

Copy link
Contributor Author

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. 😉

Copy link
Contributor Author

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.

Copy link
Contributor Author

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...

@jasnell
Copy link
Member

jasnell commented Feb 4, 2016

LGTM

@silverwind
Copy link
Contributor

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?

@estliberitas
Copy link
Contributor Author

@silverwind I'm ok with that

@silverwind
Copy link
Contributor

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 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assert Issues and PRs related to the assert subsystem. doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants