diff options
author | Gabriel Mazetto <gabriel@gitlab.com> | 2016-04-01 15:03:39 -0300 |
---|---|---|
committer | Gabriel Mazetto <gabriel@gitlab.com> | 2016-04-06 03:30:56 -0300 |
commit | 207b7218aa4394dc24c68041eade04474ff41537 (patch) | |
tree | 6f9cde70ccd9b0b5f757b868875bd01cdc141148 /lib | |
parent | 22055e10580ae93c2cb87956eefba0a06e9b50d0 (diff) | |
download | gitlab-ce-207b7218aa4394dc24c68041eade04474ff41537.tar.gz |
Ensure correct filter order to validate with our markdown specpatch/fix-markdown-preview-wikis
Diffstat (limited to 'lib')
-rw-r--r-- | lib/banzai/filter/gollum_tags_filter.rb | 8 | ||||
-rw-r--r-- | lib/banzai/pipeline/wiki_pipeline.rb | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/banzai/filter/gollum_tags_filter.rb b/lib/banzai/filter/gollum_tags_filter.rb index cfd3e28ed09..f710a4971b0 100644 --- a/lib/banzai/filter/gollum_tags_filter.rb +++ b/lib/banzai/filter/gollum_tags_filter.rb @@ -118,7 +118,7 @@ module Banzai end if path - content_tag(:img, nil, src: path) + content_tag(:img, nil, src: path, class: tag_class('image')) end end @@ -155,7 +155,7 @@ module Banzai href = ::File.join(project_wiki_base_path, reference) end - content_tag(:a, name || reference, href: href) + content_tag(:a, name || reference, href: href, class: tag_class('page')) end def project_wiki @@ -172,6 +172,10 @@ module Banzai def validate needs :project_wiki end + + def tag_class(type) + "gfm gollum gollum-#{type}" + end end end end diff --git a/lib/banzai/pipeline/wiki_pipeline.rb b/lib/banzai/pipeline/wiki_pipeline.rb index bcb89485dec..c37b8e71cb0 100644 --- a/lib/banzai/pipeline/wiki_pipeline.rb +++ b/lib/banzai/pipeline/wiki_pipeline.rb @@ -4,7 +4,7 @@ module Banzai def self.filters @filters ||= begin super.insert_after(Filter::TableOfContentsFilter, Filter::GollumTagsFilter) - .insert_after(Filter::TableOfContentsFilter, Filter::WikiLinkFilter) + .insert_before(Filter::TaskListFilter, Filter::WikiLinkFilter) end end end |