actiontext-syntax-highlighter 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 237e94b19c7b9fcf502f85f01e71cd7d4eb6bdf372feedb036cc88699863127a
4
- data.tar.gz: c7c503cbc3d413e1543b1df16bef35e5eebbb6611b82482ed52debbf970a1261
3
+ metadata.gz: 28c5abf9a320e71b38f550c9435230cd7c5fda56ae398c66d8950108a18d7f8e
4
+ data.tar.gz: 7b8ffc6db9f3ef39de71bfc40caa0aa02a20d7c949d8a4ac081080a4298ddbc1
5
5
  SHA512:
6
- metadata.gz: 7d37cbff4ad68c89e68cac23b3e3034ea04264f764ab52996da963b329cdd9d12898a5eb12bc0b3c0d79fb43072f623368e185f2860dbf8abc58c38ecb8a79c7
7
- data.tar.gz: ba94cbab086ab0e4ff21b6a35addedb23ba69e9f8c6c8fca1d8bb77038572556af952d85d7a487f320b9316a01b909b1d2a777861d56e8431d43b02e52242bc0
6
+ metadata.gz: 7f86913946d78cf17b3255504151dc034c6aed5ab36564979ddf1f367763f030b1f203a56bfb8fc686cd38bc3e8c498a5f823246c6170d462c415f7c229bb7f2
7
+ data.tar.gz: ccfe7b1d14110e3101baf503a30d632914587bd212a1d8598086d9aa5c16b67a43f29151979f3212f1eaff1658342d2a4c2d2d3dc3ebede8d534909f4d2a6bb9
@@ -31,8 +31,10 @@ class ActionTextSyntaxHighlighter::HighlightedCodeBlock < ApplicationRecord
31
31
 
32
32
  private
33
33
  def process_content
34
- self.content = CGI.unescapeHTML(self.content)
35
- self.content&.gsub!(/<br>/, "\n")
34
+ if self.content.present?
35
+ self.content = CGI.unescapeHTML(self.content)
36
+ self.content.gsub!(/<br>/, "\n")
37
+ end
36
38
  end
37
39
 
38
40
  def highlighter
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActionTextSyntaxHighlighter
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actiontext-syntax-highlighter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ayush Newatia