BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
a4fda9f8
Commit
a4fda9f8
authored
Feb 09, 2017
by
Douwe Maan
Committed by
Regis
Feb 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge branch 'dm-copy-as-gfm-anchor-link' into 'master'
Correctly transform an anchor link to GFM when copying it See merge request !9080
parent
50d66b63
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
copy_as_gfm.js.es6
app/assets/javascripts/copy_as_gfm.js.es6
+3
-0
copy_as_gfm_spec.rb
spec/features/copy_as_gfm_spec.rb
+2
-0
No files found.
app/assets/javascripts/copy_as_gfm.js.es6
View file @
a4fda9f8
...
...
@@ -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,
...
...
spec/features/copy_as_gfm_spec.rb
View file @
a4fda9f8
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment