Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Shaw committed Aug 19, 2019
1 parent 09c5a42 commit 9507ba3
Show file tree
Hide file tree
Showing 5 changed files with 1,107 additions and 741 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var path = require('path')
var childProcess = require('child_process')
var through = require('through2')
var extend = require('extend')
var Remarkable = require('remarkable')
var { Remarkable } = require('remarkable')
var hljs = require('highlight.js')
var tmp = require('tmp')
var duplexer = require('duplexer')
Expand All @@ -25,7 +25,7 @@ function markdownpdf (opts) {
opts.loadTimeout = opts.loadTimeout == null ? 10000 : opts.loadTimeout
opts.preProcessMd = opts.preProcessMd || function () { return through() }
opts.preProcessHtml = opts.preProcessHtml || function () { return through() }
opts.remarkable = extend({breaks: true}, opts.remarkable)
opts.remarkable = extend({ breaks: true }, opts.remarkable)
opts.remarkable.preset = opts.remarkable.preset || 'default'
opts.remarkable.plugins = opts.remarkable.plugins || []
opts.remarkable.syntax = opts.remarkable.syntax || []
Expand Down Expand Up @@ -86,12 +86,12 @@ function markdownpdf (opts) {
inputStream.pause()

// Create tmp file to save HTML for phantom to process
tmp.file({postfix: '.html'}, function (err, tmpHtmlPath, tmpHtmlFd) {
tmp.file({ postfix: '.html' }, function (err, tmpHtmlPath, tmpHtmlFd) {
if (err) return outputStream.emit('error', err)
fs.closeSync(tmpHtmlFd)

// Create tmp file to save PDF to
tmp.file({postfix: '.pdf'}, function (err, tmpPdfPath, tmpPdfFd) {
tmp.file({ postfix: '.pdf' }, function (err, tmpPdfPath, tmpPdfFd) {
if (err) return outputStream.emit('error', err)
fs.closeSync(tmpPdfFd)

Expand Down
Loading

0 comments on commit 9507ba3

Please sign in to comment.