Correctly transform an anchor link to GFM when copying it

This commit is contained in:
Douwe Maan 2017-02-08 19:46:01 -06:00
parent 110cd58999
commit 2e040c3ff7
3 changed files with 9 additions and 0 deletions

View File

@ -91,6 +91,9 @@ require('./lib/utils/common_utils');
},
},
SanitizationFilter: {
'a[name]:not([href]):empty'(el, text) {
return el.outerHTML;
},
'dl'(el, text) {
let lines = text.trim().split('\n');
// Add two spaces to the front of subsequent list items lines,

View File

@ -0,0 +1,4 @@
---
title: Correctly transform an anchor link to GFM when copying it
merge_request:
author:

View File

@ -251,6 +251,8 @@ describe 'Copy as GFM', feature: true, js: true do
'SanitizationFilter',
<<-GFM.strip_heredoc
<a name="named-anchor"></a>
<sub>sub</sub>
<dl>