question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sort is case sensitive

See original GitHub issue

Version

@nuxt/content: 1.11.1 nuxt: 2.14.12

Reproduction Link

https://codesandbox.io/s/brave-kowalevski-wur2d

Steps to reproduce

Use two titles: one starting with uppercase and one with lower and them make a sort by title asc.

What is Expected?

Sort ascending independent of the uppercase or lowercase title.

What is actually happening?

Sort displays the uppercase entries first, then the lowercase ones.

There’s no indication on Docs too, so this seems to be a bug to me.
If isn’t a bug, there a way to make that sort “case insensitive”? Maybe put that note on docs?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
NozomuIkutacommented, Feb 7, 2021

By the way, you can achieve second approach without waiting native support.

Here is a demo (CodeSandbox), where I modify document objects in content:file:beforeInsert hook (link to docs), and call sortBy method with a key whose value is lower case.

1reaction
NozomuIkutacommented, Feb 9, 2021

The PR has been merged, so let me close this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sort records in case-sensitive order
Sort records in case-sensitive order ... Access sorts records in ascending or descending order without regard to case. However, by writing a few...
Read more >
GNU sort by case-sensitive - linux
The sort utility in Ubuntu 10.04 ( ...
Read more >
Case Sensitive Sorting in Excel
Select a cell within the data that you want to sort and then go to the Data tab and click Sort · In...
Read more >
How to perform case-insensitive sorting array of string in ...
I have an array of strings I need to sort in JavaScript, but in a case-insensitive way. How ...
Read more >
Examples of case-sensitive and case-insensitive string ...
Examples of case-sensitive and case-insensitive string sorting ; orange; apple; Banana; Pineapple; Grape ; Banana; Grape; Pineapple; apple; orange ; apple; Banana ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found