fletcher / fletcher/MultiMarkdown

Fails to Properly Parse Nested Definition Lists

Open
#30 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Perl
Stars
1.1k
Forks
510
PR merge metrics
No merged PRs in 30d

Description

MultiMarkdown fails to properly parse nested lists. Given this MultiMarkdown:

```
homepage

: The official home of this project on the web.

bugtracker
: This entry describes the bug tracking system for this distribution. It is
a [Map](#Map) with the following valid keys:

web
: a URI pointing to a web front-end for the bug
tracker

mailto
: an email address to which bug reports can be sent

repository
: This entry describes the source control repository for this distribution.
It is a [Map](#Map) with the following valid keys:

url
: a [URI](#URI) pointing to the repository itself

we
: a [URI](#URI) pointing to a web front-end for the repository

type
: a lowercase string indicating the VCS used

: Because a URI like `http://myrepo.example.com/` is ambiguous as to type,
producers should provide a `type` whenever a `url` key is given. The
`type` field should be the name of the most common program used to work
with the repository, e.g. git, svn, cvs, darcs, bzr or hg.
```

The output is:

```


homepage


The official home of this project on the web.


bugtracker


This entry describes the bug tracking system for this distribution. It is
a Map with the following valid keys:


web

: a <a href="#URI">URI</a> pointing to a web front-end for the bug
tracker

mailto
: an email address to which bug reports can be sent


repository


This entry describes the source control repository for this distribution.
It is a Map with the following valid keys:


url

: a [URI](#URI) pointing to the repository itself

we
: a [URI](#URI) pointing to a web front-end for the repository

type
:<dl>

a lowercase string indicating the VCS used

Because a URI like http://myrepo.example.com/ is ambiguous as to type,
producers should provide a type whenever a url key is given. The
type field should be the name of the most common program used to work
with the repository, e.g. git, svn, cvs, darcs, bzr or hg.


```

Wow. Here's what it should be (output generated by peg-multimarkdown):

```


homepage


The official home of this project on the web.

bugtracker


This entry describes the bug tracking system for this distribution. It is
a Map with the following valid keys:



web

a URI pointing to a web front-end for the bug
tracker

mailto

an email address to which bug reports can be sent


repository


This entry describes the source control repository for this distribution.
It is a Map with the following valid keys:



url

a URI pointing to the repository itself

we

a URI pointing to a web front-end for the repository

type

a lowercase string indicating the VCS used



Because a URI like http://myrepo.example.com/ is ambiguous as to type,
producers should provide a type whenever a url key is given. The
type field should be the name of the most common program used to work
with the repository, e.g. git, svn, cvs, darcs, bzr or hg.



```

Since I rely on Text::MultiMarkdown from CPAN in my Perl apps (which is directly ported from here), I can't use peg-multimarkdown ([yet!](https://github.com/fletcher/peg-multimarkdown/issues/46)). So a fix for this issue in the Perl version would be appreciated.

Thanks!

David

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.