Fix for multiple includes on the same page; ignoring leading/trailing whitespace in WikiLinks [both by dm1]
This commit is contained in:
parent
7c5958ae7b
commit
f6a3b88693
4 changed files with 36 additions and 3 deletions
|
@ -99,7 +99,7 @@ module WikiChunk
|
|||
class Link < WikiLink
|
||||
|
||||
unless defined? WIKI_LINK
|
||||
WIKI_LINK = /(":)?\[\[([^\]]+)\]\]/
|
||||
WIKI_LINK = /(":)?\[\[\s*([^\]\s][^\]]+?)\s*\]\]/
|
||||
LINK_TYPE_SEPARATION = Regexp.new('^(.+):((file)|(pic))$', 0, 'utf-8')
|
||||
ALIAS_SEPARATION = Regexp.new('^(.+)\|(.+)$', 0, 'utf-8')
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue