-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trim leading and trailing spaces: suggested by @diwash007
- Loading branch information
1 parent
600a8b2
commit 687a460
Showing
2 changed files
with
2 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
687a460
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
687a460#diff-fd0046e2ea37f7ce3e91c417c57233c4b71a3324c477b5070196305ba363835cR38
why not something simpler like
post.body.presence.truncate(300)
?687a460
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will is check if the content is all white space?
687a460
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Content could have a
<p>
tag on it with a lot of white spaces, which is considered empty by us humans, so will this fix that issue?687a460
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh now I get what you are trying to achieve. never mind my previous comment. sorry for the confusion.
687a460
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem sir. Thanks for the help. @yshmarov