BigW Consortium Gitlab

Commit efbcaa5d by Eric Eastwood

Fix description flash with newline differences (HTML entities)

parent 7755c0b8
......@@ -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
......
function normalizeNewlines(str) {
return str.replace(/(\r|
)?(\n|
)/g, '\n');
}
export default normalizeNewlines;
......@@ -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); }; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment