Skip to content

Commit 78f17d7

Browse files
authored
Merge pull request #2 from git-things-done/trim-blocks
Attempt to prevent MD newline screw ups
2 parents 3c09069 + 4348a81 commit 78f17d7

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,11 @@ jobs:
1313
NODE_ENV: development
1414
- run: npm run dist
1515
- run: git diff --exit-code
16+
test:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v2
20+
- run: npm ci
21+
env:
22+
NODE_ENV: development
23+
- run: npm test

dist/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26148,7 +26148,8 @@ function templater(template, github) {
2614826148
const templateVariables = {
2614926149
github,
2615026150
env: process.env,
26151-
timestamp: Date.now()
26151+
timestamp: Date.now(),
26152+
trimBlocks: true
2615226153
};
2615326154
let { attributes, body } = front_matter__WEBPACK_IMPORTED_MODULE_2___default()(template);
2615426155
body = env.renderString(body, templateVariables);

src/templater.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ export function templater(template: string, github: any): {title: string, body:
1212
const templateVariables = {
1313
github,
1414
env: process.env,
15-
timestamp: Date.now()
15+
timestamp: Date.now(),
16+
trimBlocks: true
1617
}
1718

1819
interface FrontMatterAttributes {

0 commit comments

Comments
 (0)