Permit YAML blocks to end with three dots #2110

Closed
wants to merge 48 commits into
from

Projects

None yet
Contributor
lmullen commented Mar 3, 2014

The YAML spec permits blocks to end with three dots (...) in addition to
three dashes (---): http://www.yaml.org/spec/1.2/spec.html#id2760395. Some
programs that work with Jekyll (e.g., Pandoc) prefer the dots to dashes. This
commit permits the YAML metadata block to end with either dots or dashes. It
includes tests.

@lmullen lmullen Permit YAML blocks to end with three dots
The YAML spec permits blocks to end with three dots (...) in addition to
three dashes (---): http://www.yaml.org/spec/1.2/spec.html#id2760395. Some
programs that work with Jekyll (e.g., Pandoc) prefer the dots to dashes. This
commit permits the YAML metadata block to end with either dots or dashes. It
includes tests.
54e360a
Owner
parkr commented Mar 6, 2014

I've given this some thought and I see no reason we should change because of Pandoc's preference. If I've learned anything in the last year, it's that giving users too many ways to do something causes confusion.

Also, the YAML spec gives me rage so I don't care much what they have to say considering omitting the last segment is also valid. 😄

What's the use-case for this?

Contributor
lmullen commented Mar 6, 2014

At least one of the reasons for using a plain-text blogging engine is to filter the posts through Unix-lie tools. It seems to me that if the spec says that multiple end of document delimiters are permitted, and if other tools in the same space are using those delimiters, then Jekyll ought to support the full spec (even if you don't like the spec). Pandoc documents now use a YAML header for metadata, just like Jekyll posts. The use case is for files that can be both Pandoc documents and Jekyll blog posts.

Yes, omitting the last segment is valid in a file that contains only YAML, but it wouldn't be valid in a file (like a Jekyll blog post or Pandoc document) that contains other information, so that part of the spec is beside the point.

Owner
parkr commented Mar 10, 2014

What do you think, @mattr-?

@mattr- mattr- was assigned by parkr Mar 10, 2014
@parkr parkr added the Feature label Mar 16, 2014
@parkr parkr closed this Mar 17, 2014
@parkr parkr reopened this Mar 17, 2014
Owner
parkr commented Mar 24, 2014

@lmullen I don't see any need to keep this from going through. If you wouldn't mind rebasing, I'll merge.

stephenmcd and others added some commits Apr 22, 2013
@stephenmcd @lmullen stephenmcd Use valid css class names when pygments language contains invalid cha…
…rs, eg html+jango
21d3a54
@parkr @lmullen parkr Properly clean path for Windows machines which is *nix-compliant. 206c091
@slavapavlutin @lmullen slavapavlutin Fix tables alignments in Cucumber features 746efee
@slavapavlutin @lmullen slavapavlutin Remove redundant whitespace in a Cucumber feature fd4074e
@parkr @lmullen parkr Update history to reflect merge of #2108 [ci skip] ffc8ec8
@parkr @lmullen parkr Extract core extensions into a Utils module
Fixes #2111
fcef9e5
@parkr @lmullen parkr Add Utils.stringify_hash_keys e6a576b
@parkr @lmullen parkr Rename those Utils functions. 9aeae07
@parkr @lmullen parkr Use jekyll-sass-converter 1.0.0.rc3 46be471
@parkr @lmullen parkr Update history to reflect merge of #2112 [ci skip] 0e600a2
@mscharley @lmullen mscharley Use the rake helper for mkdir as this version makes two folders on Wi…
…ndows
be6bdc4
@mattr- @lmullen mattr- Update history to reflect merge of #2118 [ci skip] 041a42a
@mattr- @lmullen mattr- Properly strip drive name from clean path when sanitizing path. f384b6b
@XhmikosR @lmullen XhmikosR Remove obsolete `normalize_options`. b212283
@XhmikosR @lmullen XhmikosR Trim trailing spaces and convert tabs to spaces. 2bdae4d
@parkr @lmullen parkr Update history to reflect merge of #2121 [ci skip] 64e37ba
@parkr @lmullen parkr Update history to reflect merge of #2109 [ci skip] dbdce22
@parkr @lmullen parkr Update history to reflect merge of #2122 [ci skip] 4aafc12
@XhmikosR @lmullen XhmikosR Update normalize.css to v3.0.0. d1d76ee
@XhmikosR @lmullen XhmikosR Update modernizr to v2.7.1. 1a8f15c
@XhmikosR @lmullen XhmikosR Losslessly compress images.
Before: 89,5 KB (91.747 bytes)
After:  87,4 KB (89.573 bytes)
6f68521
@parkr @lmullen parkr Update history to reflect merge of #2128 [ci skip] 65c4bba
@parkr @lmullen parkr Update history to reflect merge of #2126 [ci skip] c1eef0f
@parkr @lmullen parkr Initialize each command in its own class so we can be *magical*. 9b2cf67
@parkr @lmullen parkr Have a list of blessed gems to require and load. 1c4c663
@parkr @lmullen parkr Add a message and error out when Pygments returns nil. 758e739
@parkr @lmullen parkr Update history to reflect merge of #2143 [ci skip] 1fd439b
@parkr @lmullen parkr Update history to reflect merge of #2129 [ci skip] 206f1a5
@lmullen PatrickC8t Added Jekyll-Ordinal plugin to list of third-party plugins.
Closes #2150.

Signed-off-by: Parker Moore <parkrmoore@gmail.com>
1b79ced
@parkr @lmullen parkr Update history to reflect merge of #2150 [ci skip] 2672a7b
@parkr @lmullen parkr Update history to reflect merge of #994 [ci skip] d8e36b1
@stephenmcd @lmullen stephenmcd Protect against nil @lang before fixing for css class names. 51dcae1
@mattr- @lmullen mattr- Update history to reflect merge of #2155 [ci skip] 455bd9d
@parkr @lmullen parkr Lock to cucumber v1.3.11 because 1.3.12 is failing like crazy. 6571727
@parkr @lmullen parkr Move test dir to inside tmp in this repo. 2a4d5c8
@parkr @lmullen parkr Went with @stomar's suggestion 9a2d439
@lmullen lmullen Add jekyll_figure plugin e012cf1
@parkr @lmullen parkr Update history to reflect merge of #2158 [ci skip] b58ce77
@parkr @lmullen parkr Update history to reflect merge of #2148 [ci skip] 5d337e4
@jpiasetz @lmullen jpiasetz Add travis_retry to config 62ad10e
@parkr @lmullen parkr Update history to reflect merge of #2160 [ci skip] fa6d2d1
@hildred @lmullen hildred better document safe mode 328ca69
@mattr- @lmullen mattr- Update history to reflect merge of #2163 [ci skip] 627dfa7
@mrtazz @lmullen mrtazz add support for unpublished drafts
I keep all my ideas for blog posts as drafts in my draft folder. However I'm
only really working on a couple at once. This let's me mark drafts that I'm
not working on right now as unpublished so they don't clutter the site while
I'm checking on the other drafts.
e438781
@parkr @lmullen parkr Update history to reflect merge of #2164 [ci skip] f7362fa
@lmullen lmullen Merge branch 'recognize-dots-in-yaml' of https://github.com/lmullen/j… 0ba0d4a
@lmullen lmullen Merge branch 'master' of github.com:jekyll/jekyll 2060cf4
Contributor
lmullen commented Mar 24, 2014

I think I did the rebase correctly; if not, my apologies.

@parkr parkr added a commit that referenced this pull request Apr 2, 2014
@parkr parkr Update history to reflect merge of #2110. [ci skip]
Closes #2110.
31443e9
@parkr parkr closed this in 31443e9 Apr 2, 2014
Owner
parkr commented Apr 2, 2014

Merged in 52ac2b3! Thanks :)

@parkr parkr added a commit that referenced this pull request Nov 22, 2014
@parkr parkr Revert "Permit YAML blocks to end with three dots"
This reverts commit 52ac2b3, introduced in
v2.0.0 by @lmullen. It has been reverted because it adds complication to
the process of writing Jekyll sites ("Do I use dots or dashes here??") and
because the sole purpose was to bend to the will of pandoc, which could
just as easily prefer dashes to dots.

Ref: #2110, 3134
c88ca41
@parkr parkr referenced this pull request Nov 22, 2014
Closed

Revert "Permit YAML blocks to end with three dots" #3138

1 of 2 tasks complete
@parkr parkr added a commit that referenced this pull request Jan 10, 2015
@parkr parkr Revert "Permit YAML blocks to end with three dots"
This reverts commit 52ac2b3, introduced in
v2.0.0 by @lmullen. It has been reverted because it adds complication to
the process of writing Jekyll sites ("Do I use dots or dashes here??") and
because the sole purpose was to bend to the will of pandoc, which could
just as easily prefer dashes to dots.

Ref: #2110, 3134
46d2794
@jekyllbot jekyllbot locked and limited conversation to collaborators Feb 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.