gollum-lib 5.0.4-java → 5.0.5-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -0
- data/gemspec.rb +1 -1
- data/lib/gollum-lib/filter/tags.rb +1 -0
- data/lib/gollum-lib/helpers.rb +1 -1
- data/lib/gollum-lib/macro.rb +4 -0
- data/lib/gollum-lib/macro/series.rb +2 -2
- data/lib/gollum-lib/markups.rb +3 -2
- data/lib/gollum-lib/page.rb +1 -1
- data/lib/gollum-lib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58d6a76ac3ff4e944c5954024fe52ba50cf208f86c9623131bb3aac6011c8540
|
4
|
+
data.tar.gz: 59b0439f772973507254aaa566e134984c5c1761f7242b4c09c9ef3fe9e34aab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 047b9eae8522314a1cd2300fb6eacfa58376595a0ed84c514b35d0a1a61f16625bf12793f47b76339a328ae57add678b0829265086352de3d0cde285030131fc
|
7
|
+
data.tar.gz: 9ab4e40babd84d9baa3041e7212431fb05a95855dd428964e4d5467ebebd75b2405a1a7fbbb038a5ab8ca0ae14401f172eaf2f6f0e6fd8f510358e7b0f5cbb3c
|
data/Rakefile
CHANGED
data/gemspec.rb
CHANGED
@@ -8,7 +8,7 @@ def specification(version, default_adapter, platform = nil)
|
|
8
8
|
s.name = 'gollum-lib'
|
9
9
|
s.version = version
|
10
10
|
s.platform = platform if platform
|
11
|
-
s.date = '2020-
|
11
|
+
s.date = '2020-08-03'
|
12
12
|
s.date = '2017-04-13'
|
13
13
|
s.rubyforge_project = 'gollum-lib'
|
14
14
|
s.license = 'MIT'
|
@@ -230,6 +230,7 @@ class Gollum::Filter::Tags < Gollum::Filter
|
|
230
230
|
else
|
231
231
|
name = page ? path_to_link_text(link) : link
|
232
232
|
end
|
233
|
+
|
233
234
|
link = page ? page.escaped_url_path : ERB::Util.url_encode(link).force_encoding('utf-8')
|
234
235
|
generate_link(link, name, extra, presence)
|
235
236
|
end
|
data/lib/gollum-lib/helpers.rb
CHANGED
data/lib/gollum-lib/macro.rb
CHANGED
@@ -25,6 +25,10 @@ module Gollum
|
|
25
25
|
"<p class=\"gollum-error\">#{s}</p>"
|
26
26
|
end
|
27
27
|
|
28
|
+
def active_page
|
29
|
+
return @page.parent_page || @page
|
30
|
+
end
|
31
|
+
|
28
32
|
# The special class we reserve for only the finest of screwups. The
|
29
33
|
# underscore is to make sure nobody can define a real, callable macro
|
30
34
|
# with the same name, because that would be... exciting.
|
@@ -3,7 +3,7 @@ module Gollum
|
|
3
3
|
|
4
4
|
class Series < Gollum::Macro
|
5
5
|
def render(series_prefix = "")
|
6
|
-
raise "This page's name does not match the prefix '#{series_prefix}'" unless
|
6
|
+
raise "This page's name does not match the prefix '#{series_prefix}'" unless active_page.name =~ /^#{series_prefix}/
|
7
7
|
render_links(*find_series(series_prefix))
|
8
8
|
end
|
9
9
|
|
@@ -21,7 +21,7 @@ module Gollum
|
|
21
21
|
dir = @wiki.pages.select {|page| ::File.dirname(page.path) == ::File.dirname(@page.path)}
|
22
22
|
dir.select! {|page| page.name =~ /\A#{series_prefix}/ } unless series_prefix.empty?
|
23
23
|
dir.sort_by! {|page| page.name}
|
24
|
-
self_index = dir.find_index {|page| page.name ==
|
24
|
+
self_index = dir.find_index {|page| page.name == active_page.name}
|
25
25
|
if self_index > 0
|
26
26
|
return dir[self_index-1], dir[self_index+1]
|
27
27
|
else
|
data/lib/gollum-lib/markups.rb
CHANGED
@@ -58,7 +58,7 @@ module Gollum
|
|
58
58
|
if gem_exists?('pandoc-ruby')
|
59
59
|
GitHub::Markup::Markdown::MARKDOWN_GEMS.delete('kramdown')
|
60
60
|
GitHub::Markup::Markdown::MARKDOWN_GEMS['pandoc-ruby'] = proc { |content|
|
61
|
-
PandocRuby.convert(content, :from =>
|
61
|
+
PandocRuby.convert(content, :from => 'markdown-tex_math_dollars-raw_tex', :to => :html, :filter => 'pandoc-citeproc')
|
62
62
|
}
|
63
63
|
else
|
64
64
|
GitHub::Markup::Markdown::MARKDOWN_GEMS['kramdown'] = proc { |content|
|
@@ -85,7 +85,8 @@ module Gollum
|
|
85
85
|
:extensions => ['rest', 'rst'])
|
86
86
|
register(:asciidoc, "AsciiDoc",
|
87
87
|
:skip_filters => [:Tags],
|
88
|
-
:enabled => MarkupRegisterUtils::gem_exists?("asciidoctor")
|
88
|
+
:enabled => MarkupRegisterUtils::gem_exists?("asciidoctor"),
|
89
|
+
:extensions => ['adoc','asciidoc'])
|
89
90
|
register(:mediawiki, "MediaWiki",
|
90
91
|
:enabled => MarkupRegisterUtils::gem_exists?("wikicloth"),
|
91
92
|
:extensions => ['mediawiki','wiki'], :reverse_links => true)
|
data/lib/gollum-lib/page.rb
CHANGED
@@ -277,7 +277,7 @@ module Gollum
|
|
277
277
|
#
|
278
278
|
# Returns the String extension (no leading period).
|
279
279
|
def self.format_to_ext(format)
|
280
|
-
format
|
280
|
+
Gollum::Markup.formats[format] ? Gollum::Markup.formats[format][:extensions].first : nil
|
281
281
|
end
|
282
282
|
|
283
283
|
# The underlying wiki repo.
|
data/lib/gollum-lib/version.rb
CHANGED