honkit / honkit

:book: HonKit is building beautiful books using Markdown - Fork of GitBook

Home Page:https://honkit.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error parsing if link containing parentheses

lindeer opened this issue · comments

Summary

It is an old bug since gitbook, but still reproduce now. It is a parsing error of markdown file, caused by dependency library markdown-it (if i not mistake). It is fixed in latest markdown-it, maybe we need upgrade its version?

  • HonKit version: 4.0.4

Step to reproduce

  1. A book page as markdown format
  2. create a link text whose url contains parentheses
  • Link to code example:
[Pola](https://en.wikipedia.org/wiki/Pola_(Italian_province))

Expected results

<p><a href="https://en.wikipedia.org/wiki/Pola_(Italian_province)">Pola</a></p>

Actual results

<p><a href="https://en.wikipedia.org/wiki/Pola_(Italian_province" target="_blank">Pola</a>)</p>