Skip to content
Snippets Groups Projects
Commit 4975f416 authored by Douwe Maan's avatar Douwe Maan
Browse files

Merge branch 'dm-copy-as-gfm-anchor-link' into 'master'

Correctly transform an anchor link to GFM when copying it

See merge request !9080
parents 088096cd cc44caf7
No related branches found
No related tags found
No related merge requests found
Loading
@@ -91,6 +91,9 @@ require('./lib/utils/common_utils');
Loading
@@ -91,6 +91,9 @@ require('./lib/utils/common_utils');
}, },
}, },
SanitizationFilter: { SanitizationFilter: {
'a[name]:not([href]):empty'(el, text) {
return el.outerHTML;
},
'dl'(el, text) { 'dl'(el, text) {
let lines = text.trim().split('\n'); let lines = text.trim().split('\n');
// Add two spaces to the front of subsequent list items lines, // Add two spaces to the front of subsequent list items lines,
Loading
Loading
Loading
@@ -251,6 +251,8 @@ describe 'Copy as GFM', feature: true, js: true do
Loading
@@ -251,6 +251,8 @@ describe 'Copy as GFM', feature: true, js: true do
'SanitizationFilter', 'SanitizationFilter',
   
<<-GFM.strip_heredoc <<-GFM.strip_heredoc
<a name="named-anchor"></a>
<sub>sub</sub> <sub>sub</sub>
   
<dl> <dl>
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment