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

Draft logic for non-breaking spaces. #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Draft logic for non-breaking spaces. #11

wants to merge 1 commit into from

Conversation

tmpfs
Copy link

@tmpfs tmpfs commented Feb 7, 2017

Ok, here is a quite crude attempt to fix the problem, let me know what you think.

Really we should know that the previous tag element is an inline element. Otherwise things like <div><div></div> </div> will be converted to something like:

<div>
  <div></div>&nbsp;
</div>

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling b893c95 on makestatic:nbsp into e08ace7 on reshape:master.

@jescalan
Copy link
Member

jescalan commented Feb 7, 2017

This is good, great start and thanks for catching this issue and diving right in! Perhaps we should put this specific transform behind an option or something?

I guess there's no real way we can know if the previous element is an inline element, since any element can get display: inline, so this might be the best we can do!

I think the next steps are perhaps adding a config option to control this setting and adding this to the test, then adding a comment above the code block to indicate what it's actually doing.

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.

3 participants