Fix Maruku Hanging Bug
A Maruku-syntax <div> with an unclosed IAL (and, it seems, at least one equation) would cause Instiki to hang. Badly. Requiring a 'kill -9' to terminate it. Reverting the OpenDiv and CloseDiv Regexps to my, more simple-minded, versions fixes the problem.
This commit is contained in:
parent
dcab2f870e
commit
53751a61f0
2 changed files with 29 additions and 12 deletions
27
vendor/plugins/maruku/lib/maruku/ext/div.rb
vendored
27
vendor/plugins/maruku/lib/maruku/ext/div.rb
vendored
|
@ -10,11 +10,28 @@
|
|||
#| +--------------------------------------------------
|
||||
#+---------------------------------------------------
|
||||
|
||||
OpenDiv = /^[ ]{0,3}\+\-\-+\s*(\{([^{}]*|".*"|'.*')*\})?\s*\-*\s*$/
|
||||
CloseDiv = /^[ ]{0,3}\=\-\-+\s*(\{([^{}]*|".*"|'.*')*\})?\s*\-*\s*$/
|
||||
# note these are not enough for parsing the above example:
|
||||
#OpenDiv = /^[ ]{0,3}\+\-\-+\s*(.*)$/
|
||||
#CloseDiv = /^[ ]{0,3}\=\-\-+\s*(.*)$/
|
||||
## These cause Instiki to hang when it encounters
|
||||
##
|
||||
## +--
|
||||
## ###### Definition
|
||||
## A _Froelicher Space_ is a triple $(X,C_X,F_X)$
|
||||
## =-- {: .num_defn #FroelicherSpace
|
||||
##
|
||||
## or
|
||||
##
|
||||
## +-- {: .num_defn #FroelicherSpace
|
||||
## ###### Definition
|
||||
## A _Froelicher Space_ is a triple $(X,C_X,F_X)$
|
||||
## =--
|
||||
#
|
||||
#OpenDiv = /^[ ]{0,3}\+\-\-+\s*(\{([^{}]*|".*"|'.*')*\})?\s*\-*\s*$/
|
||||
#CloseDiv = /^[ ]{0,3}\=\-\-+\s*(\{([^{}]*|".*"|'.*')*\})?\s*\-*\s*$/
|
||||
#
|
||||
## note these are not enough for parsing the above example:
|
||||
## (but they don't produce a hang ...)
|
||||
#
|
||||
OpenDiv = /^[ ]{0,3}\+\-\-+\s*(.*)$/
|
||||
CloseDiv = /^[ ]{0,3}\=\-\-+\s*(.*)$/
|
||||
StartPipe = /^[ ]{0,3}\|(.*)$/ # $1 is rest of line
|
||||
DecorativeClosing = OpenDiv
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue