Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 72ee08b5ab | |||
| 45547624e4 | |||
| f928cfa8be |
@@ -145,7 +145,7 @@ task :gemspec => :validate do
|
|||||||
split("\n").
|
split("\n").
|
||||||
sort.
|
sort.
|
||||||
reject { |file| file =~ /^\./ }.
|
reject { |file| file =~ /^\./ }.
|
||||||
reject { |file| file =~ /^(rdoc|pkg|test)/ }.
|
reject { |file| file =~ /^(rdoc|pkg|test|Home\.md)/ }.
|
||||||
map { |file| " #{file}" }.
|
map { |file| " #{file}" }.
|
||||||
join("\n")
|
join("\n")
|
||||||
|
|
||||||
|
|||||||
+2
-3
@@ -5,8 +5,8 @@ Gem::Specification.new do |s|
|
|||||||
s.required_ruby_version = ">= 1.8.7"
|
s.required_ruby_version = ">= 1.8.7"
|
||||||
|
|
||||||
s.name = 'gollum'
|
s.name = 'gollum'
|
||||||
s.version = '2.2.4'
|
s.version = '2.2.5'
|
||||||
s.date = '2012-10-13'
|
s.date = '2012-10-14'
|
||||||
s.rubyforge_project = 'gollum'
|
s.rubyforge_project = 'gollum'
|
||||||
|
|
||||||
s.summary = "A simple, Git-powered wiki."
|
s.summary = "A simple, Git-powered wiki."
|
||||||
@@ -47,7 +47,6 @@ Gem::Specification.new do |s|
|
|||||||
s.files = %w[
|
s.files = %w[
|
||||||
Gemfile
|
Gemfile
|
||||||
HISTORY.md
|
HISTORY.md
|
||||||
Home.md
|
|
||||||
LICENSE
|
LICENSE
|
||||||
README.md
|
README.md
|
||||||
Rakefile
|
Rakefile
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ require File.expand_path('../gollum/web_sequence_diagram', __FILE__)
|
|||||||
require File.expand_path('../gollum/frontend/uri_encode_component', __FILE__)
|
require File.expand_path('../gollum/frontend/uri_encode_component', __FILE__)
|
||||||
|
|
||||||
module Gollum
|
module Gollum
|
||||||
VERSION = '2.2.4'
|
VERSION = '2.2.5'
|
||||||
|
|
||||||
def self.assets_path
|
def self.assets_path
|
||||||
::File.expand_path('gollum/frontend/public', ::File.dirname(__FILE__))
|
::File.expand_path('gollum/frontend/public', ::File.dirname(__FILE__))
|
||||||
|
|||||||
@@ -511,10 +511,15 @@ module Gollum
|
|||||||
#
|
#
|
||||||
# Returns the placeholder'd String data.
|
# Returns the placeholder'd String data.
|
||||||
def extract_code(data)
|
def extract_code(data)
|
||||||
data.gsub!(/^([ \t]*)~~~ ?([^\r\n]+)?\r?\n(.+?)\r?\n\1~~~\r?$/m) do
|
data.gsub!(/^([ \t]*)(~~~+) ?([^\r\n]+)?\r?\n(.+?)\r?\n\1(~~~+)\r?$/m) do
|
||||||
m_indent = $1
|
m_indent = $1
|
||||||
m_lang = $2
|
m_start = $2 # ~~~
|
||||||
m_code = $3
|
m_lang = $3
|
||||||
|
m_code = $4
|
||||||
|
m_end = $5 # ~~~
|
||||||
|
|
||||||
|
# start and finish tilde fence must be the same length
|
||||||
|
return '' if m_start.length != m_end.length
|
||||||
|
|
||||||
lang = m_lang ? m_lang.strip : nil
|
lang = m_lang ? m_lang.strip : nil
|
||||||
id = Digest::SHA1.hexdigest("#{lang}.#{m_code}")
|
id = Digest::SHA1.hexdigest("#{lang}.#{m_code}")
|
||||||
|
|||||||
@@ -236,6 +236,19 @@ context "Markup" do
|
|||||||
assert_equal expected, output
|
assert_equal expected, output
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test "~~~ code blocks #537 with lots of tildes" do
|
||||||
|
page = 'test_rgx'
|
||||||
|
@wiki.write_page(page, :markdown,
|
||||||
|
%Q(~~~~~~ {#hi .ruby .sauce}
|
||||||
|
~~
|
||||||
|
'hi'~
|
||||||
|
~~~~~~
|
||||||
|
), commit_details)
|
||||||
|
output = @wiki.page(page).formatted_data
|
||||||
|
expected = %Q{<div class=\"highlight\"><pre><span class=\"o\">~~</span>\n<span class=\"s1\">'hi'</span><span class=\"o\">~</span>\n</pre></div>}
|
||||||
|
assert_equal expected, output
|
||||||
|
end
|
||||||
|
|
||||||
test "wiki link within code block" do
|
test "wiki link within code block" do
|
||||||
@wiki.write_page("Potato", :markdown, " sed -i '' 's/[[:space:]]*$//'", commit_details)
|
@wiki.write_page("Potato", :markdown, " sed -i '' 's/[[:space:]]*$//'", commit_details)
|
||||||
page = @wiki.page("Potato")
|
page = @wiki.page("Potato")
|
||||||
|
|||||||
Reference in New Issue
Block a user