Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Support ignoring front matter sections in Markdown files #277

Closed
rvesse opened this issue Jun 24, 2021 · 2 comments
Closed

Comments

@rvesse
Copy link

rvesse commented Jun 24, 2021

When using Markdown to author documentation, some documentation processors e.g. Jekyll, make use of a front matter section e.g.

---
layout: default
title: Airline
permalink: index.html
---

# Airline

Airline is an annotation-driven Java library for building Command Line Interfaces (CLIs), it supports simple commands all the way through to complex Git style CLIs with groups and user defined command aliases.

Airline aims to reduce the boiler plate code typically associated with CLIs in Java, many common behaviours can be achieved purely with annotations and zero user code.  Let's take a look at an ultra simple example:

This is actual example from one of my open source projects - https://github.com/rvesse/airline/blob/master/docs/index.md

This front matter is basically a section of YAML content that is used to provide variables to the documentation processor when generating the final output so the formatting of this section is significant.

If I use rewrap on this file it will re-wrap this section into a single line e.g.

Incorrectly wrapped front matter

Which will then break the documentation processor if I don't manually correct it.

This makes it annoying to rewrap content that wasn't previously consistently wrapped because you either have to remember to manually correct wrapping on the front matter (which I keep forgetting) or select the content excluding the front matter (which makes doing a quick Ctrl+A, Alt+Q a non-starter)

@stkb stkb added the in pre-release version Is in pre-release version but not in stable yet label Nov 16, 2021
stkb added a commit that referenced this issue Jan 14, 2022
- New architecture (still WIP) with performance increase.
- Markdown: new parser that fixes many small bugs (inc #288), as well as
  supporting:
  - Front matter header (#277, #294)
  - Link reference definitions (#63, #93)
  - Footnotes (#188)
- ReStructuredText support (standalone & for Python, almost complete)
  (#88).
- Julia: support `#= ... =#` block comments (#302)
- Visual Studio: Wrap to rulers generated from .editorconfig by the
  Editor Guidelines extension (thereby indirectly supporting
  .editorconfig) (#300).
@stkb
Copy link
Owner

stkb commented Jan 14, 2022

Fixed in v1.16.0

@stkb stkb closed this as completed Jan 14, 2022
@stkb stkb removed the in pre-release version Is in pre-release version but not in stable yet label Jan 14, 2022
@rvesse
Copy link
Author

rvesse commented Jan 17, 2022

@stkb Awesome, thanks for addressing this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants