History

Avoid stripping some empty SVG elements

Calum Smith committed 1 year ago

Commit d877a451 parent bf4e9011 file · +1 −1Browse files

Unified · Split

lib/docs/filters/core/clean_text.rb+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22
33 module Docs
44 class CleanTextFilter < Filter
5− EMPTY_NODES_RGX = /<(?!td|th|iframe|mspace)(\w+)[^>]*>[[:space:]]*<\/\1>/
5+ EMPTY_NODES_RGX = /<(?!td|th|iframe|mspace|rect|path|ellipse|line|polyline)(\w+)[^>]*>[[:space:]]*<\/\1>/
66
77 def call
88 return html if context[:clean_text] == false

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t