diff --git a/vendor/plugins/maruku/lib/maruku/ext/div.rb b/vendor/plugins/maruku/lib/maruku/ext/div.rb index efb4e60b..c308a24e 100644 --- a/vendor/plugins/maruku/lib/maruku/ext/div.rb +++ b/vendor/plugins/maruku/lib/maruku/ext/div.rb @@ -10,28 +10,10 @@ #| +-------------------------------------------------- #+--------------------------------------------------- -## 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*(.*)$/ +#OpenDiv = /^[ ]{0,3}\+\-\-+\s*(.*)$/ +#CloseDiv = /^[ ]{0,3}\=\-\-+\s*(.*)$/ +OpenDiv = /^[ ]{0,3}\+\-\-+\s*(\{([^{}]*?|".*?"|'.*?')*\})?\s*\-*\s*$/ +CloseDiv = /^[ ]{0,3}\=\-\-+\s*(\{([^{}]*?|".*?"|'.*?')*\})?\s*\-*\s*$/ StartPipe = /^[ ]{0,3}\|(.*)$/ # $1 is rest of line DecorativeClosing = OpenDiv diff --git a/vendor/plugins/maruku/lib/maruku/input/type_detection.rb b/vendor/plugins/maruku/lib/maruku/input/type_detection.rb index e019414c..cd91d6ef 100644 --- a/vendor/plugins/maruku/lib/maruku/input/type_detection.rb +++ b/vendor/plugins/maruku/lib/maruku/input/type_detection.rb @@ -74,9 +74,9 @@ module MaRuKu; module Strings # $1 = id $2 = attribute list - AttributeDefinitionList = /^\s{0,3}\{([\w\d\s]+)\}:\s*(.*)\s*$/ + AttributeDefinitionList = /^\s{0,3}\{([\w\d\s]+)\}:\s*(.*?)\s*$/ # - InlineAttributeList = /^\s{0,3}\{([:#\.].*)\}\s*$/ + InlineAttributeList = /^\s{0,3}\{([:#\.].*?)\}\s*$/ # Example: # ^:blah blah # ^: blah blah @@ -128,11 +128,11 @@ module MaRuKu; module Strings )? # title is optional }x - IncompleteLink = %r{^[ ]{0,3}\[([^\[\]]+)\]:\s*$} + IncompleteLink = %r{^[ ]{0,3}\[([^\[\]]+?)\]:\s*$} - HeaderWithId = /^(.*)\{\#([\w_-]+)\}\s*$/ + HeaderWithId = /^(.*?)\{\#([\w_-]+)\}\s*$/ - HeaderWithAttributes = /^(.*)\{(.*)\}\s*$/ + HeaderWithAttributes = /^(.*?)\{(.*?)\}\s*$/ # if contains a pipe, it could be a table header @@ -140,7 +140,7 @@ module MaRuKu; module Strings # -------------: Sep = /\s*(\:)?\s*-+\s*(\:)?\s*/ # | -------------:| ------------------------------ | - TableSeparator = %r{^(\|?#{Sep}\|?)+\s*$} + TableSeparator = %r{^(\|?#{Sep}\|?)+?\s*$} EMailAddress = /<([^:]+@[^:]+)>/