Automattic / Automattic/simplenote-ios

Alphabetical Sorting Should Ignore Markdown Heading Syntax On First Line of Note

Open
#340 0 comments 0 reactions 0 assignees View on GitHub
[feature] note list bug
Dominant language
Swift
Stars
2.2k
Forks
297
Avg merge
13h 25m
Merged PRs (30d)
6

Description

### Expected
When sorting notes alphabetically, any heading Markdown syntax on the first line should be ignored for sorting purposes.

### Observed
If you have some number of notes that have a `#` before the first line of text, the `#` used for sorting purposes when the notes list is set to sort alphabetically.

This is unexpected since the `#` is not shown in the list view at all.

### Reproduced
> 1. Create a note and type `# This is a note` on the first line.
> 2. Create another and type `Another Note` on the first line.
> 3. Navigate to Settings and change the sort order to Alphabetically A-Z (this can also be observed with Alphabetically Z-A).
> 4. View your notes list — `# This is a note` will be listed before `Another Note` even though A is after T and the `#` is not displayed.

Video of behavior: https://d.pr/free/v/3yjaWj

Make|Model|iOS Version|App Version
-|-|-|-
Apple|iPhone|iOS 12.3.1|v4.8.0

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the behavior in the iOS app using the listed note contents and alphabetical sort settings. Investigate the note-list sorting behavior and verify that a first-line Markdown heading is ignored, while the visible note text determines the order in both A-Z and Z-A modes.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.