marktext / marktext/marktext

Marktext should not add new lines between numbered list items

Open
#2,479 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

:beetle: pri/major 🐛 bug 🦏 list block
Dominant language
TypeScript
Stars
61.6k
Forks
4.6k
Avg merge
23h 49m
Merged PRs (30d)
89

Description

Description

Marktext adds new lines between numbered list items

  • Can you reproduce the issue?
Steps to reproduce
  1. Have simple Markdown document with numbered list inside:

    Some text before list:
    
    1. First
    1. Second with subitems
    
       * red
       * orange
       * blue
    
    1. Third
    
    Some text after list.
    

    Including last line it has 13 lines of code and 126 bytes in size.

  2. Open this document using MarkText

  3. Close MarkText confirming document save

Expected behavior:

the MarkText does not change the document

Actual behavior:

the MarkText changed the document contents and added empty lines between ordered list items:

Some text before list:

1. First

2. Second with subitems
   
   * red
   * orange
   * blue

3. Third

Some text after list.

Note: such document changes add difficulties to version control. The 1., 2. and 3. are already known as https://github.com/marktext/marktext/issues/2035 .

Versions
  • Mark Text version: MarkText 0.16.3 (from FlatPak)
  • Operating system: Ubuntu MATE 18.04 LTS

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the save cycle with the 13-line Markdown document described in the issue, then compare the original and saved contents to isolate where blank lines are introduced. Trace the document save or Markdown formatting entry point responsible for ordered lists and verify that saving preserves the original list spacing and nested items.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, typescript
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.