Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
2e040c3f
Commit
2e040c3f
authored
Feb 08, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly transform an anchor link to GFM when copying it
parent
110cd589
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
0 deletions
+9
-0
app/assets/javascripts/copy_as_gfm.js.es6
app/assets/javascripts/copy_as_gfm.js.es6
+3
-0
changelogs/unreleased/copy-as-gfm-anchor-link.yml
changelogs/unreleased/copy-as-gfm-anchor-link.yml
+4
-0
spec/features/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 @
2e040c3f
...
...
@@ -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,
...
...
changelogs/unreleased/copy-as-gfm-anchor-link.yml
0 → 100644
View file @
2e040c3f
---
title
:
Correctly transform an anchor link to GFM when copying it
merge_request
:
author
:
spec/features/copy_as_gfm_spec.rb
View file @
2e040c3f
...
...
@@ -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