mirror of https://github.com/status-im/NimYAML.git
git what the fuck are you doing
This commit is contained in:
parent
26eb38c5c8
commit
6130c24370
|
@ -82,15 +82,12 @@
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
<<<<<<< HEAD
|
|
||||||
function setTextContent(element, text) {
|
function setTextContent(element, text) {
|
||||||
while (element.firstChild!==null) {
|
while (element.firstChild!==null) {
|
||||||
element.removeChild(element.firstChild); // remove all existing content
|
element.removeChild(element.firstChild); // remove all existing content
|
||||||
}
|
}
|
||||||
element.appendChild(document.createTextNode(text));
|
element.appendChild(document.createTextNode(text));
|
||||||
}
|
}
|
||||||
=======
|
|
||||||
>>>>>>> Build proper HTML documentation
|
|
||||||
function parse() {
|
function parse() {
|
||||||
var r = new XMLHttpRequest();
|
var r = new XMLHttpRequest();
|
||||||
var params = "style=" + encodeURIComponent(document.querySelector(
|
var params = "style=" + encodeURIComponent(document.querySelector(
|
||||||
|
@ -105,7 +102,6 @@
|
||||||
var result = JSON.parse(r.responseText);
|
var result = JSON.parse(r.responseText);
|
||||||
switch(result.code) {
|
switch(result.code) {
|
||||||
case 0:
|
case 0:
|
||||||
<<<<<<< HEAD
|
|
||||||
setTextContent(output, result.output);
|
setTextContent(output, result.output);
|
||||||
output.style.color = "black";
|
output.style.color = "black";
|
||||||
break;
|
break;
|
||||||
|
@ -117,39 +113,16 @@
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
setTextContent(output, "Presenter error:\n" + result.message);
|
setTextContent(output, "Presenter error:\n" + result.message);
|
||||||
=======
|
|
||||||
output.innerText = result.output;
|
|
||||||
output.style.color = "black";
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
output.innerText = "Parser error at line " + result.line +
|
|
||||||
", column " + result.column + ":\n" + result.message +
|
|
||||||
"\n\n" + result.detail;
|
|
||||||
output.style.color = "orange";
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
output.innerText = "Presenter error:\n" + result.message;
|
|
||||||
>>>>>>> Build proper HTML documentation
|
|
||||||
output.style.color = "orange";
|
output.style.color = "orange";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if (r.status == 0) {
|
} else if (r.status == 0) {
|
||||||
<<<<<<< HEAD
|
|
||||||
setTextContent(output,
|
setTextContent(output,
|
||||||
"YAML parser server does not seem to be available.");
|
"YAML parser server does not seem to be available.");
|
||||||
output.style.color = "red";
|
output.style.color = "red";
|
||||||
} else {
|
} else {
|
||||||
setTextContent(output, "Status: " + r.status +
|
setTextContent(output, "Status: " + r.status +
|
||||||
"\nException occurred on server:\n\n" + r.responseText);
|
"\nException occurred on server:\n\n" + r.responseText);
|
||||||
=======
|
|
||||||
output.innerText =
|
|
||||||
"YAML parser server does not seem to be available.";
|
|
||||||
output.style.color = "red";
|
|
||||||
} else {
|
|
||||||
output.innerText = "Status: " + r.status +
|
|
||||||
"\nException occurred on server:\n\n" +
|
|
||||||
r.responseText;
|
|
||||||
>>>>>>> Build proper HTML documentation
|
|
||||||
output.style.color = "red";
|
output.style.color = "red";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue