Pre Chunk-Handler gets confused when XML parser converts empty elements to short-tag syntax.
Reported by Andrew Stacey.
This commit is contained in:
parent
e387d095ec
commit
903c4b6bdd
3 changed files with 19 additions and 1 deletions
|
@ -18,7 +18,7 @@ module Literal
|
|||
# A literal chunk that protects 'code' and 'pre' tags from wiki rendering.
|
||||
class Pre < AbstractLiteral
|
||||
PRE_BLOCKS = "a|pre|code|math"
|
||||
PRE_PATTERN = Regexp.new('<('+PRE_BLOCKS+')\b[^>]*?>.*?</\1>', Regexp::MULTILINE)
|
||||
PRE_PATTERN = Regexp.new('<('+PRE_BLOCKS+')\b[^>]*?(>.*?</\1>|/>)', Regexp::MULTILINE)
|
||||
def self.pattern() PRE_PATTERN end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue