Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Merge request for CommonMark compliance improvements #334

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

anthonywilliams
Copy link

Hi,

I've been using ParseDown for some Markdown processing, and wanted to use some CommonMark features that weren't supported.

I've forked the repository and made some changes that improve the conformance to CommonMark. It would be great if you could merge them into the main Parsedown repo.

In order to avoid any breaking changes to existing users, the new features are only enabled when explicitly requested. To enable the preservation of tabs use:

$pd=new Parsedown();
$pd->setExpandedTabs(false);

To enable the CommonMark HTML block processing use:

$pd->setCommonMarkHtmlBlocks(true);

I hope you find this a useful patch.

Anthony

@PhrozenByte PhrozenByte mentioned this pull request Sep 5, 2016
@aidantwoods
Copy link
Collaborator

aidantwoods commented Apr 6, 2018

@anthonywilliams any interest in updating this for the latest master? :)

There were some changes merged already that should mean we are now doing HTML blocks per CommonMark spec by default.
From your changes, we probably also want to be preserving tabs by default (I can't foresee any major problems with moving towards CommonMark in that regard). If it turns out that preserving tabs causes some unforeseen breakage then we can gate it behind strict mode instead of it being default, I think we should try matching spec first though :)

@anthonywilliams
Copy link
Author

I'll take a look in a couple of weeks. No free time just now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants