When someone post a code in issue (for example technical part) and she/he use Mac the code may contain Line Separator unicode character (U+2028 : LINE SEPARATOR) that seems not correct!
How can I get ride of those? is there any fix for that?
I used this user.js script run by TamperMonkey extension for now:
// ==UserScript==
// @name remove Line Separator character for Jira
// @namespace http://scripts.sadeq.uk/get-ride-of-line-separator.user.js
// @version 0.2
// @description this will remove inusefull Line Separator character from notes in Jira
// @author Sadeq
// @match https://*.atlassian.net/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=sadeq.uk
// @grant none
// ==/UserScript==
(function () {
'use strict';
var FixLSTimer;
const replaceOnDocument = (pattern, string, {target = document.body} = {}) => {
clearTimeout(FixLSTimer);
[
target,
...target.querySelectorAll("*:not(script):not(noscript):not(style)"),
].forEach(({childNodes: [...nodes]}) => nodes
.filter(({nodeType}) => nodeType === document.TEXT_NODE)
.forEach((textNode) => {
if (!textNode.isContentEditable) {
textNode.textContent = textNode.textContent.replace(pattern, string)
}
}
));
clearTimeout(FixLSTimer);
};
document.addEventListener('load', function(e) {
FixLSTimer = setTimeout( () => replaceOnDocument('\u2028', ''), 100);
}, true);
})();
Hi Sedeq - Welcome to the Atlassian Community!
Maybe try this:
Use {{issue.summary.replaceAll("\n", "")}} to remove all newline characters ("\n") instead of {{issue.summary}}. |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is not \n (New Line character) it is Line Separator character ( U+2028 or 0x2028 ) In addition I'm just a user.
is there any solution for that?
ps. More information about this character available here: https://unicodemap.org/details/0x2028/index.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If i was the administrator I can use your suggested way to get ride of that but small change ( `\n` -> `\0x2028` ) but I just have user access :-/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.