felangel / felangel/mason

fix: Extra line with condition statement

Open
#1,253 5 comments 2 reactions 0 assignees View on GitHub
bug customer:🦄
Dominant language
Dart
Stars
1.1k
Forks
113
PR merge metrics
No merged PRs in 30d

Description

**Description**
According to the documentation, this :

```
{{^publish}}
publish_to: none
{{/publish}}
dependencies:
flutter:
sdk: flutter
{{#useGoogleFonts}}
google_fonts: latest
{{/useGoogleFonts}}
```

with the following configuration :

```
{
"publish": false,
"useGoogleFonts": true
}
```

should generate this :

```
publish_to: none
dependencies:
flutter:
sdk: flutter
google_fonts: latest
```

But in reality, what it generates is the following :

```

publish_to: none

dependencies:
flutter:
sdk: flutter

google_fonts: latest

```

As you can see, there is some extra space.

**Steps To Reproduce**

1. Clone [this repository](https://github.com/Pierre-Monier/demo_bug_mason)
2. at the root, run `mason get && mason make demo -c config.json -o ./output`
3. See the generated file in `./output/HELLO.md`

**Expected Behavior**

The generated file should have no extra space, as described in the doc

> I use version 0.1.0-dev.53

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.