Skip to content

Commit f105434

Browse files
committed
Guard against nil values
1 parent cd1ba85 commit f105434

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

demo/app/helpers/formatting_helper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def initialize(content, view_context:, code_object: nil)
2020
# as is, but you can override this method to provide custom rendering logic
2121
# based on the specified markup format.
2222
def html_markup_markdown(content)
23+
return "" unless content
2324
return "" unless content.strip.present?
2425

2526
output = Kramdown::Document.new(content, input: "GFM").to_html

0 commit comments

Comments
 (0)