Browse Source

Normalise formatting, hopefully in a way that means we won't fight reformatting :)

dev/git-series/gccdum
Matt Godbolt 6 years ago
parent
commit
f6134e3699
  1. 36
      static/compiler.js

36
static/compiler.js

@ -626,23 +626,25 @@ define(function (require) {
var word = ed.getModel().getWordAtPosition(pos);
if (!word || !word.word) return;
var opcode = word.word.toUpperCase();
getAsmInfo(word.word).then(_.bind(function (asmHelp) {
if (asmHelp) {
new Alert().alert(opcode + " help", asmHelp.html +
'<br><br>For more information, visit <a href="http://www.felixcloutier.com/x86/' + asmHelp.url + '" target="_blank" rel="noopener noreferrer">the ' +
opcode + ' documentation <span class="glyphicon glyphicon-new-window" width="16px" height="16px" title="Opens in a new window"/></span></a>.',
function () {
ed.focus();
ed.setPosition(pos);
}
);
} else {
new Alert().notify('This token was not found in the documentation.<br>Only <i>most</i> <b>Intel x86</b> opcodes supported for now.', {
group: "notokenindocs",
alertClass: "notification-error",
dismissTime: 3000
});
}}), function (rejection) {
getAsmInfo(word.word).then(
_.bind(function (asmHelp) {
if (asmHelp) {
new Alert().alert(opcode + " help", asmHelp.html +
'<br><br>For more information, visit <a href="http://www.felixcloutier.com/x86/' + asmHelp.url + '" target="_blank" rel="noopener noreferrer">the ' +
opcode + ' documentation <span class="glyphicon glyphicon-new-window" width="16px" height="16px" title="Opens in a new window"/></span></a>.',
function () {
ed.focus();
ed.setPosition(pos);
}
);
} else {
new Alert().notify('This token was not found in the documentation.<br>Only <i>most</i> <b>Intel x86</b> opcodes supported for now.', {
group: "notokenindocs",
alertClass: "notification-error",
dismissTime: 3000
});
}
}), function (rejection) {
new Alert().notify('There was an error fetching the documentation for this opcode (' + rejection + ').', {
group: "notokenindocs",
alertClass: "notification-error",

Loading…
Cancel
Save