Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
207b7218
Commit
207b7218
authored
Apr 01, 2016
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure correct filter order to validate with our markdown spec
parent
22055e10
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
lib/banzai/filter/gollum_tags_filter.rb
lib/banzai/filter/gollum_tags_filter.rb
+6
-2
lib/banzai/pipeline/wiki_pipeline.rb
lib/banzai/pipeline/wiki_pipeline.rb
+1
-1
spec/features/markdown_spec.rb
spec/features/markdown_spec.rb
+1
-1
No files found.
lib/banzai/filter/gollum_tags_filter.rb
View file @
207b7218
...
@@ -118,7 +118,7 @@ module Banzai
...
@@ -118,7 +118,7 @@ module Banzai
end
end
if
path
if
path
content_tag
(
:img
,
nil
,
src:
path
)
content_tag
(
:img
,
nil
,
src:
path
,
class:
tag_class
(
'image'
)
)
end
end
end
end
...
@@ -155,7 +155,7 @@ module Banzai
...
@@ -155,7 +155,7 @@ module Banzai
href
=
::
File
.
join
(
project_wiki_base_path
,
reference
)
href
=
::
File
.
join
(
project_wiki_base_path
,
reference
)
end
end
content_tag
(
:a
,
name
||
reference
,
href:
href
)
content_tag
(
:a
,
name
||
reference
,
href:
href
,
class:
tag_class
(
'page'
)
)
end
end
def
project_wiki
def
project_wiki
...
@@ -172,6 +172,10 @@ module Banzai
...
@@ -172,6 +172,10 @@ module Banzai
def
validate
def
validate
needs
:project_wiki
needs
:project_wiki
end
end
def
tag_class
(
type
)
"gfm gollum gollum-
#{
type
}
"
end
end
end
end
end
end
end
lib/banzai/pipeline/wiki_pipeline.rb
View file @
207b7218
...
@@ -4,7 +4,7 @@ module Banzai
...
@@ -4,7 +4,7 @@ module Banzai
def
self
.
filters
def
self
.
filters
@filters
||=
begin
@filters
||=
begin
super
.
insert_after
(
Filter
::
TableOfContentsFilter
,
Filter
::
GollumTagsFilter
)
super
.
insert_after
(
Filter
::
TableOfContentsFilter
,
Filter
::
GollumTagsFilter
)
.
insert_
after
(
Filter
::
TableOfContents
Filter
,
Filter
::
WikiLinkFilter
)
.
insert_
before
(
Filter
::
TaskList
Filter
,
Filter
::
WikiLinkFilter
)
end
end
end
end
end
end
...
...
spec/features/markdown_spec.rb
View file @
207b7218
...
@@ -39,7 +39,7 @@ describe 'GitLab Markdown', feature: true do
...
@@ -39,7 +39,7 @@ describe 'GitLab Markdown', feature: true do
end
end
def
doc
(
html
=
@html
)
def
doc
(
html
=
@html
)
Nokogiri
::
HTML
::
DocumentFragment
.
parse
(
html
)
@doc
||=
Nokogiri
::
HTML
::
DocumentFragment
.
parse
(
html
)
end
end
# Shared behavior that all pipelines should exhibit
# Shared behavior that all pipelines should exhibit
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment