Skip to content
Snippets Groups Projects
Commit 33d6a849 authored by Pregmodder's avatar Pregmodder
Browse files

Reverted a bit of the options macro code.

parent ab09498a
No related branches found
No related tags found
No related merge requests found
...@@ -93,7 +93,9 @@ Macro.add('options', { ...@@ -93,7 +93,9 @@ Macro.add('options', {
found = true; found = true;
found_index = i; found_index = i;
} }
} else if (this.payload[i].name === 'comment') {} else if (this.payload[i].name === 'optionif') {} else { } else if (this.payload[i].name === 'comment') {
} else if (this.payload[i].name === 'optionif') {
} else {
throw new Error("Only valid tag is 'option' inside 'options'"); throw new Error("Only valid tag is 'option' inside 'options'");
} }
} }
...@@ -165,12 +167,13 @@ Macro.add('options', { ...@@ -165,12 +167,13 @@ Macro.add('options', {
} }
} }
jQuery(this.output).wiki( jQuery(this.output).wiki(
`<span class="optionMacro ${currentOptionIsNumber ? 'optionMacroNumber' : ''}">` + '<span class="optionMacro ' + (currentOptionIsNumber ? 'optionMacroNumber' : '') + '">' +
`<span class="optionDescription">${title} ${description} </span>` + '<span class="optionDescription">' + title + ' ' + description + "</span>" +
`<span class="optionValue">${output}</span>` + '<span class="optionValue">' + output + "</span>" +
`${comment ? '<span class="optionComment">//${comment}//</span>' : ''}` + (comment ? '<span class="optionComment">//' + comment + "//</span>" : '') +
`</span>`); '</span>');
} catch (ex) { }
catch (ex) {
return this.error('bad options expression: ' + ex.message); return this.error('bad options expression: ' + ex.message);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment