Modified comments in Code.js

This commit is contained in:
n1474335 2017-04-11 14:41:30 +00:00
parent a840504b3d
commit bf91352fce
1 changed files with 1 additions and 2 deletions

View File

@ -273,8 +273,7 @@ const Code = {
.replace(/\s*,\s*/g, ", ")
.replace(/\s*{/g, " {")
.replace(/}\n/g, "}\n\n")
// I was told not to look at this.
// I looked anyhow.
// Hacky horribleness
.replace(/(if|for|while|with|elif|elseif)\s*\(([^\n]*)\)\s*\n([^{])/gim, "$1 ($2)\n $3")
.replace(/(if|for|while|with|elif|elseif)\s*\(([^\n]*)\)([^{])/gim, "$1 ($2) $3")
.replace(/else\s*\n([^{])/gim, "else\n $1")