Add normalize_whitespace filter #4917

Merged
merged 2 commits into from Jun 14, 2016

Conversation

Projects
None yet
4 participants
@pathawks
Member

pathawks commented May 20, 2016

See #4877

@envygeeks

This comment has been minimized.

Show comment
Hide comment
@envygeeks

envygeeks Jun 2, 2016

Contributor

Maybe we should also add strip_whitespace that does \s+|\n+ to " "?

Contributor

envygeeks commented Jun 2, 2016

Maybe we should also add strip_whitespace that does \s+|\n+ to " "?

+ </td>
+ <td class="align-center">
+ <p>
+ <code class="filter">{% raw %}{{ "a \n b" | normalize_whitepace }}{% endraw %}</code>

This comment has been minimized.

@parkr

parkr Jun 14, 2016

Member

Is it possible to add the resulting output?

@parkr

parkr Jun 14, 2016

Member

Is it possible to add the resulting output?

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Jun 14, 2016

Member

This looks more like a strip_newlines kind of change. Why normalize_whitespace? I thought we had a way to do this already...

Member

parkr commented Jun 14, 2016

This looks more like a strip_newlines kind of change. Why normalize_whitespace? I thought we had a way to do this already...

@pathawks

This comment has been minimized.

Show comment
Hide comment
@pathawks

pathawks Jun 14, 2016

Member

The problem is that strip_newlines will improperly concatenate words.

cat
dog

becomes

catdog

I would not mind just changing strip_newlines to behave this way, but others prefer the current behavior of strip_newlines (it does just what it says).

Member

pathawks commented Jun 14, 2016

The problem is that strip_newlines will improperly concatenate words.

cat
dog

becomes

catdog

I would not mind just changing strip_newlines to behave this way, but others prefer the current behavior of strip_newlines (it does just what it says).

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Jun 14, 2016

Member

@pathawks Ok! It's a new filter so I'm fine with it.

@jekyllbot: merge +minor

Member

parkr commented Jun 14, 2016

@pathawks Ok! It's a new filter so I'm fine with it.

@jekyllbot: merge +minor

@jekyllbot jekyllbot merged commit fb1a459 into jekyll:master Jun 14, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

jekyllbot added a commit that referenced this pull request Jun 14, 2016

@parkr parkr added this to the 3.2 milestone Jun 14, 2016

@parkr parkr referenced this pull request Jul 7, 2016

Closed

Default site description outputs trailing newline #5066

5 of 17 tasks complete

@pathawks pathawks changed the title from Add normalize_whitepace filter to Add normalize_whitespace filter Jul 7, 2016

@pathawks pathawks deleted the pathawks:pr/normalize_whitespace branch Jul 7, 2016

@pathawks pathawks referenced this pull request in jekyll/minima Jul 7, 2016

Merged

Use normalize_whitespace filter for meta description #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment