Bump Version Number
Version 0.16 Also, allow Includes of single-letter pages.
This commit is contained in:
parent
0f843bc537
commit
61c3fb1ab9
|
@ -232,7 +232,7 @@ end
|
|||
module Instiki
|
||||
module VERSION #:nodoc:
|
||||
MAJOR = 0
|
||||
MINOR = 15
|
||||
MINOR = 16
|
||||
TINY = 0
|
||||
SUFFIX = '(MML+)'
|
||||
PRERELEASE = 'pre' # false
|
||||
|
|
|
@ -9,7 +9,7 @@ require 'chunks/wiki'
|
|||
|
||||
class Include < WikiChunk::WikiReference
|
||||
|
||||
INCLUDE_PATTERN = /\[\[!include\s+([^\]\s][^\]]+?)\s*\]\]/i
|
||||
INCLUDE_PATTERN = /\[\[!include\s+([^\]\s][^\]]*?)\s*\]\]/i
|
||||
def self.pattern() INCLUDE_PATTERN end
|
||||
|
||||
def initialize(match_data, content)
|
||||
|
@ -53,11 +53,9 @@ class Include < WikiChunk::WikiReference
|
|||
end
|
||||
|
||||
def add_to_include_list
|
||||
if Thread.current[:included_by]
|
||||
Thread.current[:included_by].push(@content.page_name)
|
||||
else
|
||||
Thread.current[:included_by] ?
|
||||
Thread.current[:included_by].push(@content.page_name) :
|
||||
Thread.current[:included_by] = [@content.page_name]
|
||||
end
|
||||
end
|
||||
|
||||
def self_inclusion(refpage)
|
||||
|
|
|
@ -70,9 +70,9 @@ class WikiTest < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_include_chunk_pattern
|
||||
content = 'This is a [[!include pagename]] and [[!include WikiWord]] but [[blah]]'
|
||||
content = 'This is a [[!include pagename]] and [[!include WikiWord]] and [[!include x]]but [[blah]]'
|
||||
recognized_includes = content.scan(Include.pattern).collect { |m| m[0] }
|
||||
assert_equal %w(pagename WikiWord), recognized_includes
|
||||
assert_equal %w(pagename WikiWord x), recognized_includes
|
||||
end
|
||||
|
||||
def test_textile_link
|
||||
|
|
Loading…
Reference in a new issue