Merge pull request #284 from budziq/indentation

Fix indentation of hidden code blocks
This commit is contained in:
Mathieu David 2017-05-18 09:36:53 +02:00 committed by GitHub
commit 379ed9dc16
1 changed files with 2 additions and 2 deletions

View File

@ -146,10 +146,10 @@ $( document ).ready(function() {
for(var n = 0; n < lines.length; n++){ for(var n = 0; n < lines.length; n++){
if($.trim(lines[n])[0] == hiding_character){ if($.trim(lines[n])[0] == hiding_character){
if(first_non_hidden_line){ if(first_non_hidden_line){
lines[n] = "<span class=\"hidden\">" + "\n" + lines[n].replace(/(\s*)#/, "$1") + "</span>"; lines[n] = "<span class=\"hidden\">" + "\n" + lines[n].replace(/(\s*)# ?/, "$1") + "</span>";
} }
else { else {
lines[n] = "<span class=\"hidden\">" + lines[n].replace(/(\s*)#/, "$1") + "\n" + "</span>"; lines[n] = "<span class=\"hidden\">" + lines[n].replace(/(\s*)# ?/, "$1") + "\n" + "</span>";
} }
lines_hidden = true; lines_hidden = true;
} }