Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

(PDOC-30) Fix Markdown parsing lists parsing #37

Merged
merged 1 commit into from
Jul 20, 2015

Conversation

iankronquist
Copy link
Contributor

The transformer comment matching regex matched all whitespace after a comment.
Lines which were effectively "blank" and just had a comment would be erased.
Markdown lists need to end with a blank line. This messed up markdown
formatting.

The culprit is the regex /^\s_#\s/ which matches all of the comment ' #\n',
however we want to leave the newline alone for markdown to parse.
We replace the regex with /^\s_#[ \t]/ which will only match tabs or spaces
after the hash and leave our beloved newline alone.

Fixes PDOC 30 on JIRA

The transformer comment matching regex matched all whitespace after a comment.
Lines which were effectively "blank" and just had a comment would be erased.
Markdown lists need to end with a blank line. This messed up markdown
formatting.

The culprit is the regex /^\s*#\s/ which matches all of the comment ' #\n',
however we want to leave the newline alone for markdown to parse.
We replace the regex with /^\s*#[ \t]/ which will only match tabs or spaces
after the hash and leave our beloved newline alone.
@iankronquist iankronquist force-pushed the markdown-madness/PDOC-30 branch from 110526a to 6137e94 Compare July 16, 2015 18:51
@HAIL9000
Copy link
Contributor

I will merge this once we sort out the CI failures 👍

HAIL9000 added a commit that referenced this pull request Jul 20, 2015
(PDOC-30) Fix Markdown parsing lists parsing
@HAIL9000 HAIL9000 merged commit 0d8c4e7 into puppetlabs:master Jul 20, 2015
@chelnak chelnak added the bugfix label Oct 13, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants