Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

UziTech
Copy link
Member

@UziTech UziTech commented Jul 23, 2025

Marked version: 16.1.1

Description

A multiline list item currently gets an extra newline in the raw property

- line 1
  line 2

Tokens:

  {
    type: 'list',
    raw: '- line 1\n  line 2\n',
    ordered: false,
    start: '',
    loose: false,
    items: [
      {
        type: 'list_item',
        raw: '- line 1\n  line 2',
        task: false,
        checked: undefined,
        loose: false,
        text: 'line 1\nline 2',
        tokens: [{
          type: 'text',
-         raw: 'line 1\n\nline 2',
+         raw: 'line 1\nline 2',
          text: 'line 1\nline 2',
          tokens: [{ type: 'text', raw: 'line 1\nline 2', text: 'line 1\nline 2', escaped: false }],
        }],
      },
    ],
  },

Contributor

  • Test(s) exist to ensure functionality and minimize regression (if no tests added, list tests covering this PR); or,
  • no tests required for this PR.
  • If submitting new feature, it has been documented in the appropriate places.

Committer

In most cases, this should be a different person than the contributor.

Copy link

vercel bot commented Jul 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marked-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 3, 2025 5:19pm

@UziTech UziTech force-pushed the fix--fix-multiline-list-adds-extra-newline-to-raw branch from 65e18b9 to 25a3a98 Compare August 3, 2025 16:45
@UziTech UziTech merged commit e76453e into markedjs:master Aug 4, 2025
8 checks passed
github-actions bot pushed a commit that referenced this pull request Aug 4, 2025
## [16.1.2](v16.1.1...v16.1.2) (2025-08-04)

### Bug Fixes

* fix multiline list item adds extra newline to raw ([#3735](#3735)) ([e76453e](e76453e))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants