gajus/gitdown

Bug to convert title with number format

Open

#58 geöffnet am 24. Aug. 2020

Auf GitHub ansehen
 (5 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (51 Forks)github user discovery
bughelp wanted

Repository-Metriken

Stars
 (450 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

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

Source code:

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

// <p><code>test</code></p>
normalizedName = normalizedName.slice(3, -4);

// <code>test</code>

===

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));

// <ol>\n<li>1. Title one</li>\n</ol>
normalizedName = normalizedName.slice(3, -4);

// >\n<li>Title one</li>\n<

===

Contributor Guide