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
efbcaa5d
Commit
efbcaa5d
authored
Jun 06, 2017
by
Eric Eastwood
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix description flash with newline differences (HTML entities)
Fix
https://gitlab.com/gitlab-org/gitlab-ce/issues/33265
parent
7755c0b8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
issue_title_description.vue
...assets/javascripts/issue_show/issue_title_description.vue
+3
-1
normalize_newlines.js
app/assets/javascripts/lib/utils/normalize_newlines.js
+5
-0
notes.js
app/assets/javascripts/notes.js
+1
-4
No files found.
app/assets/javascripts/issue_show/issue_title_description.vue
View file @
efbcaa5d
...
...
@@ -4,6 +4,7 @@ import Poll from './../lib/utils/poll';
import
Service
from
'./services/index'
;
import
tasks
from
'./actions/tasks'
;
import
edited
from
'./components/edited.vue'
;
import
normalizeNewlines
from
'../lib/utils/normalize_newlines'
;
export
default
{
props
:
{
...
...
@@ -119,7 +120,8 @@ export default {
this
.
titleText
=
this
.
apiData
.
title_text
;
const
noTitleChange
=
this
.
title
===
title
;
const
noDescriptionChange
=
this
.
description
===
description
;
const
noDescriptionChange
=
normalizeNewlines
(
this
.
description
)
===
normalizeNewlines
(
description
);
/**
* since opacity is changed, even if there is no diff for Vue to update
...
...
app/assets/javascripts/lib/utils/normalize_newlines.js
0 → 100644
View file @
efbcaa5d
function
normalizeNewlines
(
str
)
{
return
str
.
replace
(
/
(\r
|
)?(\n
|

)
/g
,
'
\
n'
);
}
export
default
normalizeNewlines
;
app/assets/javascripts/notes.js
View file @
efbcaa5d
...
...
@@ -7,6 +7,7 @@
import
$
from
'jquery'
;
import
Cookies
from
'js-cookie'
;
import
CommentTypeToggle
from
'./comment_type_toggle'
;
import
normalizeNewlines
from
'./lib/utils/normalize_newlines'
;
require
(
'./autosave'
);
window
.
autosize
=
require
(
'vendor/autosize'
);
...
...
@@ -17,10 +18,6 @@ require('vendor/jquery.caret'); // required by jquery.atwho
require
(
'vendor/jquery.atwho'
);
require
(
'./task_list'
);
const
normalizeNewlines
=
function
(
str
)
{
return
str
.
replace
(
/
\r\n
/g
,
'
\
n'
);
};
(
function
()
{
var
bind
=
function
(
fn
,
me
)
{
return
function
()
{
return
fn
.
apply
(
me
,
arguments
);
};
};
...
...
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