diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-10-05 00:23:16 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-10-05 00:23:16 +0800 |
commit | 22aaebdf78d1617f8ef396915e7fe0a51e29c322 (patch) | |
tree | 5960d13e7960230055f8fbbe26cfdb500448157b /lib/banzai | |
parent | 5c9ac560e7e916c8a082c99309fbd4031b1a6803 (diff) | |
parent | 7887a3dafb6902cc39c831e307c48faf49f80b51 (diff) | |
download | gitlab-ce-all-skipped-equals-success.tar.gz |
Merge remote-tracking branch 'upstream/master' into all-skipped-equals-successall-skipped-equals-success
* upstream/master:
Fixed banzai test failures
Removed puts code :see_no_evil:
Adds v-pre to code blocks in comments
Diffstat (limited to 'lib/banzai')
-rw-r--r-- | lib/banzai/filter/sanitization_filter.rb | 2 | ||||
-rw-r--r-- | lib/banzai/filter/syntax_highlight_filter.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/banzai/filter/sanitization_filter.rb b/lib/banzai/filter/sanitization_filter.rb index 2470362e019..af1e575fc89 100644 --- a/lib/banzai/filter/sanitization_filter.rb +++ b/lib/banzai/filter/sanitization_filter.rb @@ -25,7 +25,7 @@ module Banzai return if customized?(whitelist[:transformers]) # Allow code highlighting - whitelist[:attributes]['pre'] = %w(class) + whitelist[:attributes]['pre'] = %w(class v-pre) whitelist[:attributes]['span'] = %w(class) # Allow table alignment diff --git a/lib/banzai/filter/syntax_highlight_filter.rb b/lib/banzai/filter/syntax_highlight_filter.rb index fcdb496aed2..026b81ac175 100644 --- a/lib/banzai/filter/syntax_highlight_filter.rb +++ b/lib/banzai/filter/syntax_highlight_filter.rb @@ -30,7 +30,7 @@ module Banzai # users can still access an issue/comment/etc. end - highlighted = %(<pre class="#{css_classes}"><code>#{code}</code></pre>) + highlighted = %(<pre class="#{css_classes}" v-pre="true"><code>#{code}</code></pre>) # Extracted to a method to measure it replace_parent_pre_element(node, highlighted) |