shurcooL-legacy / atom-markdown-format

Formats your Markdown text on save.

Home Page:https://atom.io/packages/markdown-format

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Destroys Jekyll posts

kvz opened this issue · comments

Hi, I tried it on a jekyll post that starts with the usual frontmatter:


---
layout: post
title: "We are lowering our pricing"
date: 2015-08-07 12:25:00
comments: true
published: false
author: Kevin van Zonneveld

---

We know you have a choice when it comes to transcoding services, and choosing the best service for your project 

And it was turned into


---

layout: post title: "We are lowering our pricing" date: 2015-08-07 12:25:00 comments: true published: false

author: Kevin van Zonneveld
----------------------

Might be cool to exclude frontmatter. I realize it may not be strictly markdown and you might not want to cover this usecase, but it seems Jekyll / Github pages / docs might at the same time be the biggest userbase dealing with markdown documents (admittedly I have not done the research on this)

This is a known consequence of it supporting pure Markdown only, without support for a YAML header. See shurcooL/markdownfmt#11. There's also a longstanding PR #14 that tries to deal with this, unfortunately I haven't had a chance to review it yet.

I may consider fixing this because as you say, those YAML headers are pretty common. Added thinking label for now.

Thanks for the quick response! Hope you figure this out.

In case anybody else stumbles upon this, I ended up using https://atom.io/packages/markdown-table-formatter as formatting tables was the hairiest of my problems and leaves the rest of the document (and frontmatters) alone.

I am now deprecating this entire package because I do not have enough resources to make it's user experience good enough and thus worthy of existing. Please see #26 for full details and rationale. Because of that, I will close this issue.