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

italics-diffing-update #40

Closed
wants to merge 1 commit into from
Closed

italics-diffing-update #40

wants to merge 1 commit into from

Conversation

adamCaxy
Copy link
Contributor

@adamCaxy adamCaxy commented Apr 7, 2016

https://caxyinteractive.atlassian.net/browse/ICC-5333

Updated HtmlDiff:processEqualOperation implode function.

@jschroed91
Copy link
Member

@adamCaxy This change actually causes issues when diffing "words" that don't have a space between them. For example, when a word is wrapped in parentheses:

screen shot 2016-04-09 at 9 18 06 pm

screen shot 2016-04-09 at 9 17 49 pm

@jschroed91
Copy link
Member

@adamCaxy I think what actually needs to happen here is to remove the trim calls on the $oldText and $newText arguments in AbstractDiff::__construct.

Since <i> is set to be diffed in isolation, the innerHtml of the i (or em) tag is passed to a new instance of HtmlDiff and trims the extra spaces. This is a problem in situations where there's an intentional space before the closing tag like

<i>italic text with a space </i>that is intentional.

I don't think there's any reason we had trimmed the $oldText/ $newText... that I can recall... so let's remove the trim calls and that should solve this issue I believe.

@jschroed91
Copy link
Member

@adamCaxy I actually made these updates in #41, so I will close this PR.

Can you review that PR if you get a chance?

@jschroed91 jschroed91 closed this Apr 10, 2016
@jschroed91 jschroed91 deleted the italics-diffing-update branch April 10, 2016 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants