gajus / gajus/gitdown

Bug to convert title with number format

Open
#58 5 comments 0 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
JavaScript
Stars
450
Forks
50
PR merge metrics
No merged PRs in 30d

Description

In file: gitdown/src/gitdown.js
Line 308 to 314

Source code:
===
// `test`
normalizedName = _.trim(marked(normalizedName));

//

test


normalizedName = normalizedName.slice(3, -4);

// test
===

The conversion is incorrect if the title like this: 1. Title one
Raw markdown: ## 1. Title one
Expected raw output: ## 1.Title one
Expected user view: 1. Title one

Actual error result:
===
// `1. Title one`
normalizedName = _.trim(marked(normalizedName));

//

    \n
  1. 1. Title one
  2. \n

normalizedName = normalizedName.slice(3, -4);

// >\n

  • Title one
  • \n<
    ===

    Contributor guide

    No contributing guide indexed for this repository

    Assessment

    This issue has not been assessed yet.

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.