We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad13b37 commit eff1058Copy full SHA for eff1058
Resources/html/views/history/history.js
@@ -175,7 +175,14 @@ var loadCommit = function(commitObject, currentRef) {
175
$("committerDate").parentNode.style.display = "none";
176
}
177
178
- $("message").innerHTML = commit.message.replace(/\b(https?:\/\/[^\s<]*)/ig, "<a href=\"$1\">$1</a>").replace(/\n/g,"<br>");
+ var textToHTML = function (txt) {
179
+ return (" "+txt+" ")
180
+ .replace(/\b(https?:\/\/[^\s<]*)/ig, "<a href=\"$1\">$1</a>")
181
+ .replace(/\n/g,"<br>")
182
+ .trim();
183
+ }
184
+
185
+ $("message").innerHTML = textToHTML(commit.message);
186
187
jQuery("#commit").show();
188
jQuery("#no-commit-message").hide();
0 commit comments