jekyll/test
Kevin Locke bb9462f12f Whole-post excerpts should match the post content
When a post does not contain an excerpt_separator, meaning the excerpt
includes the entire post, the excerpt should contain exactly the post
content.

This is desirable both from a correctness standpoint, that the excerpt
should not introduce any new content, and more practically to allow fast
and easy detection of whole-post excerpts in Liquid templates using
`post.excerpt == post.content`.  A common use-case is deciding whether
to render "Read More" links on a page containing post excerpts.

This commit does exactly that.  It avoids adding additional newlines to
the excerpt content when the excerpt includes the whole post and adds
tests to ensure that this behavior is correct and preserved going
forward.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2015-10-01 13:58:00 -07:00
..
fixtures Remove trailing whitespace 2015-02-22 20:27:15 +09:00
source Make _includes directory configurable; closes #2684 2015-08-09 16:20:58 +01:00
helper.rb Add support for JRuby, it was easier than assumed. 2015-05-15 07:10:22 -05:00
simplecov_custom_profile.rb Move simplecov_custom_profile to test/ & gate with TRAVIS env 2015-03-01 00:36:20 -08:00
test_cleaner.rb Make our own Minitest::Test subclass for further subclassing 2015-02-21 00:33:47 -08:00
test_coffeescript.rb Make our own Minitest::Test subclass for further subclassing 2015-02-21 00:33:47 -08:00
test_collections.rb Make our own Minitest::Test subclass for further subclassing 2015-02-21 00:33:47 -08:00
test_command.rb Create #mock_expects that goes directly to RSpec Mocks. 2015-04-14 14:20:55 -05:00
test_configuration.rb Make _includes directory configurable; closes #2684 2015-08-09 16:20:58 +01:00
test_convertible.rb Make our own Minitest::Test subclass for further subclassing 2015-02-21 00:33:47 -08:00
test_document.rb Separated some more readers from the main reader.rb file. 2015-03-06 17:20:25 +01:00
test_draft.rb Make our own Minitest::Test subclass for further subclassing 2015-02-21 00:33:47 -08:00
test_entry_filter.rb Merge pull request #3545 from delftswa2014/site_extract_readers 2015-03-23 19:53:07 -07:00
test_excerpt.rb Whole-post excerpts should match the post content 2015-10-01 13:58:00 -07:00
test_filters.rb filters: `where` should compare stringified versions of input & comparator 2015-08-25 23:00:58 -07:00
test_front_matter_defaults.rb fixing typo on line 31 2015-06-08 13:24:53 -03:00
test_generated_site.rb generated site tests: put the static file mod time through a date filter 2015-04-14 11:52:26 -07:00
test_kramdown.rb Make our own Minitest::Test subclass for further subclassing 2015-02-21 00:33:47 -08:00
test_layout_reader.rb Use rspec-mock instead of rr 2015-03-06 20:13:07 -05:00
test_liquid_extensions.rb Make our own Minitest::Test subclass for further subclassing 2015-02-21 00:33:47 -08:00
test_liquid_renderer.rb Add byte counter 2015-06-07 16:49:22 +00:00
test_log_adapter.rb remove non-essential with() statement 2015-04-18 23:36:12 -07:00
test_new_command.rb Use rspec-mock instead of rr 2015-03-06 20:13:07 -05:00
test_page.rb Separated some more readers from the main reader.rb file. 2015-03-06 17:20:25 +01:00
test_path_sanitization.rb Use rspec-mock instead of rr 2015-03-06 20:13:07 -05:00
test_plugin_manager.rb Make our own Minitest::Test subclass for further subclassing 2015-02-21 00:33:47 -08:00
test_post.rb always include file extension on destination files 2015-03-02 21:20:54 -08:00
test_rdiscount.rb Add support for JRuby, it was easier than assumed. 2015-05-15 07:10:22 -05:00
test_redcarpet.rb Fix: #3738; Move code wrapper from div to figure. 2015-06-10 15:20:44 -05:00
test_regenerator.rb typofix in test/test_regenerator.rb 2015-08-08 21:28:36 +01:00
test_related_posts.rb Add support for JRuby, it was easier than assumed. 2015-05-15 07:10:22 -05:00
test_sass.rb Make our own Minitest::Test subclass for further subclassing 2015-02-21 00:33:47 -08:00
test_site.rb Merge branch 'master' of https://github.com/jekyll/jekyll into _includes 2015-08-09 16:22:33 +01:00
test_static_file.rb Adapt StaticFile for collections, config defaults 2015-06-29 19:58:27 -04:00
test_tags.rb Merge branch 'master' of https://github.com/jekyll/jekyll into _includes 2015-08-09 16:22:33 +01:00
test_url.rb Make our own Minitest::Test subclass for further subclassing 2015-02-21 00:33:47 -08:00
test_utils.rb Separated some more readers from the main reader.rb file. 2015-03-06 17:20:25 +01:00