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

Spaces are stripped between consecutive tags #9

Closed
nickcernis opened this issue Nov 2, 2013 · 2 comments
Closed

Spaces are stripped between consecutive tags #9

nickcernis opened this issue Nov 2, 2013 · 2 comments
Labels

Comments

@nickcernis
Copy link
Contributor

This test currently fails:

$this->html_gives_markdown("<b>Bold</b> <i>Italic</i>", "**Test** *Italic*");

Output:

Expected :**Test** *Italic*
Actual   :**Bold***Italic*

Need a better way to preserve spaces that exist between consecutive span tags.

@colinodell
Copy link
Member

This issue seems to be caused by line 78:

$html = preg_replace('~>\s+<~', '><', $html); // Strip white space between tags to prevent creation of empty #text nodes

This is stripping out the space which originally appeared between the two tags.

I did a quick test, and removing this line seemed to resolve the issue. However, the lists aren't excluding those text nodes when determining their positions, so they go 1, 3, 5, etc. I'll need to somehow exclude those.

@colinodell colinodell changed the title Spaces are stripped between consecutive span tags Spaces are stripped between consecutive tags May 28, 2015
@colinodell colinodell assigned colinodell and unassigned nickcernis May 28, 2015
colinodell added a commit that referenced this issue May 29, 2015
@colinodell
Copy link
Member

Fixed by #28

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

No branches or pull requests

2 participants