ソースを参照

Avoid stripping some empty SVG elements

Calum Smith 3 ヶ月 前
コミット
d877a45e8c
1 ファイル変更1 行追加1 行削除
  1. 1 1
      lib/docs/filters/core/clean_text.rb

+ 1 - 1
lib/docs/filters/core/clean_text.rb

@@ -2,7 +2,7 @@
 
 module Docs
   class CleanTextFilter < Filter
-    EMPTY_NODES_RGX = /<(?!td|th|iframe|mspace)(\w+)[^>]*>[[:space:]]*<\/\1>/
+    EMPTY_NODES_RGX = /<(?!td|th|iframe|mspace|rect|path|ellipse|line|polyline)(\w+)[^>]*>[[:space:]]*<\/\1>/
 
     def call
       return html if context[:clean_text] == false