Export XHTML Pages
When a Web uses one of the Markdown Text Filters, and you export all the pages as a zip file, you'd like the MathML and SVG to render when the pages are viewed locally. This means saving them with a .xhtml extension. Users of non-XHTML-capable browsers or Textile users should still get .html files.
This commit is contained in:
parent
13b7e1d766
commit
0b2a6935a2
6 changed files with 64 additions and 20 deletions
|
@ -24,7 +24,7 @@ module Literal
|
|||
|
||||
# A literal chunk that protects HTML tags from wiki rendering.
|
||||
class Tags < AbstractLiteral
|
||||
TAGS_PATTERN = Regexp.new('<[-a-zA-Z]+[^>]*?>', Regexp::MULTILINE)
|
||||
TAGS_PATTERN = Regexp.new('</?[-a-zA-Z:]+\b[^>]*?>', Regexp::MULTILINE)
|
||||
def self.pattern() TAGS_PATTERN end
|
||||
end
|
||||
|
||||
|
@ -32,7 +32,7 @@ module Literal
|
|||
class Math < AbstractLiteral
|
||||
MATH_START = '(\${1,2}|' + Regexp.escape('\[') + '|\\begin\{equation\})'
|
||||
MATH_END = '(\${1,2}|' + Regexp.escape('\]') + '|\\end\{equation\})'
|
||||
MATH_PATTERN = Regexp.new(MATH_START + '([^$]|\\\$)+?' + MATH_END, Regexp::MULTILINE)
|
||||
MATH_PATTERN = Regexp.new(MATH_START + '([^$]|\\\$)+' + MATH_END, Regexp::MULTILINE)
|
||||
def self.pattern() MATH_PATTERN end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue