summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/copy_as_gfm.js.es6
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/copy_as_gfm.js.es6')
-rw-r--r--app/assets/javascripts/copy_as_gfm.js.es67
1 files changed, 4 insertions, 3 deletions
diff --git a/app/assets/javascripts/copy_as_gfm.js.es6 b/app/assets/javascripts/copy_as_gfm.js.es6
index f9098c7041c..7c666697cdf 100644
--- a/app/assets/javascripts/copy_as_gfm.js.es6
+++ b/app/assets/javascripts/copy_as_gfm.js.es6
@@ -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}+}`;