Skip to content

Commit

Permalink
Merge pull request #382 from seanmil/fix_numeric_defaults
Browse files Browse the repository at this point in the history
Allow numerics for templates using code_maybe_block
  • Loading branch information
jordanbreen28 authored Jan 19, 2024
2 parents 86d17ba + 083865a commit 3403b37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/puppet-strings/markdown/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module PuppetStrings::Markdown::Helpers
# @param [String] inline_prefix String to insert before if it’s inline.
# @returns [String] Markdown
def code_maybe_block(code, type: :puppet, block_prefix: "\n\n", inline_prefix: ' ')
if code.include?("\n")
if code.to_s.include?("\n")
"#{block_prefix}```#{type}\n#{code}\n```"
else
"#{inline_prefix}`#{code}`"
Expand Down

0 comments on commit 3403b37

Please sign in to comment.