tighten / jigsaw

Simple static sites with Laravel’s Blade.
https://jigsaw.tighten.com
MIT License
2.13k stars 182 forks source link

Parse fails on block texts containing colons #504

Closed natecorkish closed 3 years ago

natecorkish commented 3 years ago

I have a simple markdown file:

--- 
extends: _layouts.post 
section: content 
image: https://static.independent.co.uk/s3fs-public/thumbnails/image/2019/01/21/17/markets.jpg 
title: >
  20 pledges for 2020: Should green-minded investors avoid cheap index tracking funds?
description: > 
  But trackers pose a problem for people who are concerned enough about the climate crisis to want to green up their investments.A tracker investor is inevitably exposed to most, or all, of the constituents of the index their chosen fund tracks.Britain’s premier stock market index is, for example, chock full of natural resource companies.Business news: In pictures Show all 13 1 /13 Business news: In pictures Business news: In pictures Flybe collapses Airline Flybe has collapsed.The “ethical trust” for example, is managed “passively” in that it tracks the FTSE 350 index, made up of the FTSE 100 and the second tier FTSE 250.
date: 2020-08-31-20-07-24 
--- 

Yet it fails to parse even though I have specified the title and description as block text and validated with yaml validators

[Symfony\Component\Yaml\Exception\ParseException]
A colon cannot be used in an unquoted mapping value at line 7 (near "But tr
ackers pose a problem for people who are concerned enough about the climate
crisis to want to green up their investments.A tracker investor is inevita
bly exposed to most, or all, of the constituents of the index their chosen
fund tracks.Britain’s premier stock market index is, for example, chock ful
l of natural resource companies.Business news: In pictures Show all 13 1 /1
3 Business news: In pictures Business news: In pictures Flybe collapses Air
line Flybe has collapsed.The “ethical trust” for example, is managed “passi
vely” in that it tracks the FTSE 350 index, made up of the FTSE 100 and the
second tier FTSE 250.").

bakerkretzmar commented 3 years ago

What version of Jigsaw are you using and what is the full filename of the file that markdown is in? Do you have symfony/yaml or mnapoli/front-yaml required directly in your composer.json? If so, what version?

Also, can you double check that you don't have any extra leading or trailing whitespace on any of those lines, and that "But trackers pose..." has exactly 2 regular spaces in front of it on that line?

I can't reproduce this on a fresh Jigsaw install or on slightly older versions, although I do see a couple very old symfony/yaml issues about what looks like a similar problem.

Thanks.

natecorkish commented 3 years ago

Bumped version, working as expected now.