Commit Graph

19 Commits

Author SHA1 Message Date
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
Will Norris dae77e9a63 switch remaining textile test files to markdown
Textile support was removed from jekyll core in #3319, and most of the
tests switched to markdown at that time.  This changes the remaining
tests to use markdown as well.  The vast majority of the test cases were
testing things in the file name or front matter, so it doesn't really
matter what markup format they use.  The one test that was claiming to
test that textile was transformed had actually been moved to markdown as
well, just not renamed.

Fixes #3507
2015-02-27 18:29:52 -08:00
Parker Moore 7ad0597bff Make our own Minitest::Test subclass for further subclassing 2015-02-21 00:33:47 -08:00
Parker Moore 4b59eb4175 Fix the test inheritance for the tests. 2015-02-20 13:35:02 -08:00
Parker Moore ba2e1390ad Merge pull request #2571 from yous/patch-mixed-case-category 2015-01-17 14:55:30 -08:00
Parker Moore 2690c045ec Fix the tests so they are *PERFECT*. 2014-11-03 22:16:48 -08:00
ChaYoung You 3768d90278
Use category in downcase only for URL (Resolves #1739) 2014-08-07 11:27:41 +09:00
Quinn Shanahan 5ea62443f4 override EXCERPT_ATTRIBUTES_FOR_LIQUID
Allow EXCERPT_ATTRIBUTES_FOR_LIQUID to be overridden by inheriting class. Right now will always reference Jekyll::Post::EXCERPT_ATTRIBUTES_FOR_LIQUID. This is already being used in the codebase for ATTRIBUTES_FOR_LIQUID.
2014-05-14 13:39:16 -04:00
XhmikosR 553338636b Trim trailing spaces and convert tabs to spaces. 2014-03-11 07:44:01 +02:00
Parker Moore 22f2001ff5 Set default markdown converter to Kramdown
- Update default markdown converter in docs for configuration
- Update tests so they are in line with Kramdown output
- Add deprecation message to when config is built
2014-02-08 13:17:46 -05:00
Meeka 1da8f04aaa Removes assert_includes to pass Travis 2013-12-30 12:57:23 -05:00
Meeka 9652b7ef80 adds to_s method testing on Excerpt 2013-12-30 12:23:41 -05:00
Meeka 3a0733deb9 Adds tests for the Excerpt include?, id, and inspect methods 2013-12-30 12:15:13 -05:00
Matthew Iversen fb9de8cbf6 Fix tests to expect maruku 0.7 output 2013-12-05 12:20:11 +11:00
Matt Rogers 3c12495b00 Add test for disabled excerpts 2013-08-07 20:22:32 -05:00
Parker Moore 1e7dbcaaff 1.8.7 doesn't support Time.new(*args), so use Time.parse instead 2013-07-22 14:37:51 +02:00
Parker Moore 930aac3b79 Unit tests are simple 2013-07-22 13:03:48 +02:00
Parker Moore 3418a9197a Add categories and tags and test #to_liquid 2013-07-22 12:57:03 +02:00
Parker Moore 1bbacbd396 Dumb tests are helpful anyway 2013-07-22 12:40:49 +02:00