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
4975f416
Commit
4975f416
authored
Feb 09, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
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
parents
088096cd
cc44caf7
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 @
4975f416
...
...
@@ -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 @
4975f416
...
...
@@ -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