Skip to content

Commit 9c0626f

Browse files
authored
Create Sync Rich description with description
Sync descriptions
1 parent f9a60bc commit 9c0626f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
(function executeRule(current, previous /*null when async*/) {
2+
var description = current.getValue("description");
3+
if (description.indexOf("\t") >= 0) {
4+
description = description.replace(/\t/g, '  ');
5+
}
6+
7+
var lines = description.split("\n");
8+
9+
var rich_description = lines.map(function(line) {
10+
return '<p>' + line + '</p>';
11+
}).join("");
12+
13+
current.rich_description = rich_description;
14+
})(current, previous);

0 commit comments

Comments
 (0)