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

Echo/fix omission with break token #1

Merged
merged 2 commits into from
Apr 22, 2019

Conversation

delxen
Copy link

@delxen delxen commented Apr 17, 2019

When using break_token, omissions were not added in the truncated html.
Based on this fix.
Issue described here

@delxen delxen self-assigned this Apr 17, 2019
@delxen delxen force-pushed the echo/fix-omission-with-break-token branch from 792fa4d to 5716088 Compare April 18, 2019 06:40
@delxen delxen changed the base branch from master to echo/update-gems-and-cleanup April 18, 2019 08:04
@delxen delxen force-pushed the echo/fix-omission-with-break-token branch from 87d01ff to 4bfcc63 Compare April 18, 2019 08:06
@delxen delxen requested a review from mkousta April 18, 2019 08:18
@delxen delxen force-pushed the echo/update-gems-and-cleanup branch from e278c9b to ef78ec4 Compare April 18, 2019 08:24
@delxen delxen force-pushed the echo/fix-omission-with-break-token branch from 4bfcc63 to 14bf9ab Compare April 18, 2019 08:24
@delxen delxen force-pushed the echo/update-gems-and-cleanup branch from ef78ec4 to e124272 Compare April 18, 2019 09:46
@delxen delxen force-pushed the echo/fix-omission-with-break-token branch from 14bf9ab to d7e6d3f Compare April 19, 2019 07:54
@delxen delxen changed the base branch from echo/update-gems-and-cleanup to master April 19, 2019 08:00
@@ -242,4 +242,20 @@ def truncate(html, opts = {})
to eq '<h1>hello <!-- stuff --> and <!-- la -->...</h1>'
end
end

context 'when truncating by break_token and using a omission' do
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Minor] a -> an omission, but I suggest 'when a custom break_token and omission options are used' for consistency with the rest of the file and also discard the first expectation. I think it has already been tested with various break_token values above.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!
Removed the first expect (indeed it was tested above) and fixed the test description.
Plus I fixed all rubocop warnings in the spec file according to yogurt rubucop.yml

@mkousta
Copy link

mkousta commented Apr 19, 2019

LGTM

Xenofon Deligiannis added 2 commits April 22, 2019 11:35
When using break_token, omissions was not added in the truncated html.
Fix based on hgmnz/truncate_html#57.
Issue described here hgmnz/truncate_html#52
@delxen delxen force-pushed the echo/fix-omission-with-break-token branch from d7e6d3f to 3aa6448 Compare April 22, 2019 08:37
@delxen delxen merged commit 3aa6448 into master Apr 22, 2019
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