Remark: question about empty lines

Created on 17 Aug 2016  路  2Comments  路  Source: remarkjs/remark

Hi Titus, how are you? I don't know if this is the best place to ask this (sorry if is not):
recently I was working on a command-line interfaces to create a CHANGELOG.md based on the standard keep-a-changelog and I decided use remark to parse that markdown file.

this is my question, I noticed that the stringify function is adding some empty spaces where in the original final doesn't have it.

if the original file is:

# Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Added
- zh-CN and zh-TW translations from @tianshuo.
- de translation from @mpbzh.
- sv translation from @magol.
- tr-TR translation from @karalamalar.

### Changed
- Start versioning based on the current English version at 0.3.0 to help
translation authors keep things up-to-date.

the result is:

# Change Log

All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Added

-   zh-CN and zh-TW translations from @tianshuo.
-   de translation from @mpbzh.
-   sv translation from @magol.
-   tr-TR translation from @karalamalar.

### Changed

-   Start versioning based on the current English version at 0.3.0 to help
    translation authors keep things up-to-date.

i understand that for the markdown processor that empty spaces do not change anything for the visual aspect but i'm trying to keep the format exactly the same from the keep-a-changelog.

Is there a way to remove this empty lines?

Thanks!!

馃檵 typquestion

Most helpful comment

Excellent @wooorm ! i'm going to try that plugin!

haha @ben-eb, you are in everywhere :stuck_out_tongue_closed_eyes: i'm using some of your postcss plugins.

Thanks guys!

All 2 comments

Hi @tinchoz49, nice to meet you :)

I believe @ben-eb鈥檚 remark-heading-gap is exactly what you鈥檙e look for! There鈥檚 a list of plugins here, where you can find it and many more useful projects.

This is a fine spot for this, but there鈥檚 also the Gitter channel

Excellent @wooorm ! i'm going to try that plugin!

haha @ben-eb, you are in everywhere :stuck_out_tongue_closed_eyes: i'm using some of your postcss plugins.

Thanks guys!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rauschma picture rauschma  路  4Comments

lishid picture lishid  路  5Comments

Jolg42 picture Jolg42  路  4Comments

saramarcondes picture saramarcondes  路  5Comments

ryanpcmcquen picture ryanpcmcquen  路  4Comments