Merge ~ya-bo-ng/maas:fix-script-results-page into maas:master

Proposed by Anthony Dillon
Status: Merged
Approved by: Andres Rodriguez
Approved revision: 0db8836ba7a9e7caf16be3eb6043f5220251cc89
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~ya-bo-ng/maas:fix-script-results-page
Merge into: maas:master
Diff against target: 20 lines (+3/-1)
1 file modified
src/maasserver/static/js/angular/directives/code_lines.js (+3/-1)
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Review via email: mp+338451@code.launchpad.net

Commit message

LP: #1750007 - Fix numbered code blocks

Description of the change

Added a new line to the beginning of each new code line in the numbered code block pattern.

To post a comment you must log in.
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Please see inline.

review: Needs Information
Revision history for this message
Anthony Dillon (ya-bo-ng) :
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Hi Ant,

question inline.

review: Needs Information
Revision history for this message
Anthony Dillon (ya-bo-ng) :
Revision history for this message
Andres Rodriguez (andreserl) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/src/maasserver/static/js/angular/directives/code_lines.js b/src/maasserver/static/js/angular/directives/code_lines.js
index 160d99a..903f761 100644
--- a/src/maasserver/static/js/angular/directives/code_lines.js
+++ b/src/maasserver/static/js/angular/directives/code_lines.js
@@ -27,13 +27,15 @@
2727
28 // Count the line contents28 // Count the line contents
29 var lines = element.html().split('\n'),29 var lines = element.html().split('\n'),
30 newLine = '',
30 insert = "<code>";31 insert = "<code>";
3132
32 // Each line is to be wrapped by a span which is style & given33 // Each line is to be wrapped by a span which is style & given
33 // its appropriate line number34 // its appropriate line number
34 $.each(lines, function() {35 $.each(lines, function() {
35 insert += '<span class="code-line">' +36 insert += newLine + '<span class="code-line">' +
36 this + '</span>';37 this + '</span>';
38 newLine = '\n';
37 });39 });
38 insert += "</code>";40 insert += "</code>";
3941

Subscribers

People subscribed via source and target branches