Skip to content

Commit

Permalink
Merge pull request #2 from git-things-done/trim-blocks
Browse files Browse the repository at this point in the history
Attempt to prevent MD newline screw ups
  • Loading branch information
mxcl authored Nov 11, 2021
2 parents 3c09069 + 4348a81 commit 78f17d7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,11 @@ jobs:
NODE_ENV: development
- run: npm run dist
- run: git diff --exit-code
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm ci
env:
NODE_ENV: development
- run: npm test
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26148,7 +26148,8 @@ function templater(template, github) {
const templateVariables = {
github,
env: process.env,
timestamp: Date.now()
timestamp: Date.now(),
trimBlocks: true
};
let { attributes, body } = front_matter__WEBPACK_IMPORTED_MODULE_2___default()(template);
body = env.renderString(body, templateVariables);
Expand Down
3 changes: 2 additions & 1 deletion src/templater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export function templater(template: string, github: any): {title: string, body:
const templateVariables = {
github,
env: process.env,
timestamp: Date.now()
timestamp: Date.now(),
trimBlocks: true
}

interface FrontMatterAttributes {
Expand Down

0 comments on commit 78f17d7

Please sign in to comment.