BigW Consortium Gitlab

Commit bc3448fc by Douwe Maan

Improve spec

parent 37cabebe
......@@ -3,9 +3,10 @@
(() => {
const gfmRules = {
// Should have an entry for every filter in lib/banzai/pipeline/gfm_pipeline.rb,
// in reverse order.
// Should have test coverage in spec/features/copy_as_gfm_spec.rb.
// The filters referenced in lib/banzai/pipeline/gfm_pipeline.rb convert GitLab Flavored Markdown (GFM) to HTML.
// These handlers consequently convert that same HTML to GFM to be copied to the clipboard.
// Every filter in lib/banzai/pipeline/gfm_pipeline.rb that generates HTML from GFM should have a handler here, in reverse order.
// The GFM-to-HTML-to-GFM cycle is tested in spec/features/copy_as_gfm_spec.rb.
InlineDiffFilter: {
'span.idiff.addition'(el, text) {
return `{+${text}+}`;
......
module Banzai
module Pipeline
class GfmPipeline < BasePipeline
# Every filter should have an entry in app/assets/javascripts/copy_as_gfm.js.es6,
# in reverse order.
# Should have test coverage in spec/features/copy_as_gfm_spec.rb.
# These filters convert GitLab Flavored Markdown (GFM) to HTML.
# The handlers defined in app/assets/javascripts/copy_as_gfm.js.es6 consequently convert that same HTML to GFM to be copied to the clipboard.
# Every filter that generates HTML from GFM should have a handler in app/assets/javascripts/copy_as_gfm.js.es6, in reverse order.
# The GFM-to-HTML-to-GFM cycle is tested in spec/features/copy_as_gfm_spec.rb.
def self.filters
@filters ||= FilterArray[
Filter::SyntaxHighlightFilter,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment