Skip to content

Commit

Permalink
Code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cedx committed Nov 10, 2024
1 parent 9d46bd9 commit d6ed2a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pug.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export pug = (application, rendererOptions = {}) ->
if isAbsolute(view) or not rendererOptions.basedir? then view else join rendererOptions.basedir, view

# Renders the specified view.
_render = (view, locals = {}, renderingOptions = {}) ->
render = (view, locals = {}, renderingOptions = {}) ->
data = {rendererOptions..., @state..., locals...}
html = await Promise.resolve renderer.renderFile resolvePath(view), data
if renderingOptions.writeResponse ? yes
Expand All @@ -20,7 +20,7 @@ export pug = (application, rendererOptions = {}) ->
html

# Renders the specified view as a PDF document.
_renderPdf = (view, locals = {}, renderingOptions = {}) ->
renderPdf = (view, locals = {}, renderingOptions = {}) ->
data = {rendererOptions..., @state..., locals...}
html = await Promise.resolve renderer.renderFile resolvePath(view), data
pdf = await htmlToPdf html, browser: rendererOptions.browser, pdf: renderingOptions
Expand All @@ -30,5 +30,5 @@ export pug = (application, rendererOptions = {}) ->
pdf

# Attach the rendering functions to the application context.
Object.defineProperties application.context, render: {value: _render}, renderPdf: {value: _renderPdf}
Object.defineProperties application.context, render: {value: render}, renderPdf: {value: renderPdf}
renderer

0 comments on commit d6ed2a0

Please sign in to comment.