Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
fix: Insert content as text in ABNF (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
kesara authored Sep 24, 2023
1 parent 97f403f commit 417369a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
8 changes: 4 additions & 4 deletions www/scripts/abnf.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ function reset() {

resetButtons();
accordionItemErrors.style.display = 'none';
preErrors.innerHTML = '';
preErrors.textContent = '';
accordionItemAbnf.style.display = 'none';
preAbnf.innerHTML = '';
preAbnf.textContent = '';
}

function resetButtons() {
Expand Down Expand Up @@ -89,11 +89,11 @@ function parse() {
reset();
if (json.errors) {
accordionItemErrors.style.display = 'block';
preErrors.innerHTML = json.errors;
preErrors.textContent = json.errors;
}
if (json.abnf) {
accordionItemAbnf.style.display = 'block';
preAbnf.innerHTML = json.abnf;
preAbnf.textContent = json.abnf;
}
accordionAbnfParse.scrollIntoView();
});
Expand Down
32 changes: 16 additions & 16 deletions www/scripts/about.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const alertError = document.getElementById('alertError');
const messageError = document.getElementById('messageError');

alertError.style.display = 'none';
messageError.innerHTML = '';
messageError.textContent = '';

const apiCall = 'https://author-tools.ietf.org/api2/version';

Expand All @@ -13,22 +13,22 @@ const request = new Request(apiCall, {
fetch(request)
.then(function(response) { return response.json(); })
.then(function(json) {
document.getElementById('spanIetfat').innerHTML = json.versions.author_tools_api;
document.getElementById('spanXml2rfc').innerHTML = json.versions.xml2rfc;
document.getElementById('spanKramdown').innerHTML = json.versions['kramdown-rfc'];
document.getElementById('spanMmark').innerHTML = json.versions.mmark;
document.getElementById('spanId2xml').innerHTML = json.versions.id2xml;
document.getElementById('spanIdnits').innerHTML = json.versions.idnits;
document.getElementById('spanIddiff').innerHTML = json.versions.iddiff;
document.getElementById('spanWeasyprint').innerHTML = json.versions.weasyprint;
document.getElementById('spanAasvg').innerHTML = json.versions.aasvg;
document.getElementById('spanBap').innerHTML = json.versions.bap;
document.getElementById('spanSvgcheck').innerHTML = json.versions.svgcheck;
document.getElementById('spanRfcdiff').innerHTML = json.versions.rfcdiff;
document.getElementById('spanTex2svg').innerHTML = json.versions.tex2svg;
document.getElementById('spanUtftex').innerHTML = json.versions.utftex;
document.getElementById('spanIetfat').textContent = json.versions.author_tools_api;
document.getElementById('spanXml2rfc').textContent = json.versions.xml2rfc;
document.getElementById('spanKramdown').textContent = json.versions['kramdown-rfc'];
document.getElementById('spanMmark').textContent = json.versions.mmark;
document.getElementById('spanId2xml').textContent = json.versions.id2xml;
document.getElementById('spanIdnits').textContent = json.versions.idnits;
document.getElementById('spanIddiff').textContent = json.versions.iddiff;
document.getElementById('spanWeasyprint').textContent = json.versions.weasyprint;
document.getElementById('spanAasvg').textContent = json.versions.aasvg;
document.getElementById('spanBap').textContent = json.versions.bap;
document.getElementById('spanSvgcheck').textContent = json.versions.svgcheck;
document.getElementById('spanRfcdiff').textContent = json.versions.rfcdiff;
document.getElementById('spanTex2svg').textContent = json.versions.tex2svg;
document.getElementById('spanUtftex').textContent = json.versions.utftex;
})
.catch(error => {
alertError.style.display = 'block';
messageError.innerHTML = 'Error occured while retrieving version infomation.';
messageError.textContent = 'Error occured while retrieving version infomation.';
});
10 changes: 5 additions & 5 deletions www/scripts/clean-svg-ids.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ function reset() {
buttonDownload.href = '#';
buttonOpen.style.display = 'none';
buttonOpen.href = '#';
messageError.innerHTML = '';
messageError.textContent = '';
accordionValidation.style.display = 'none';
accordionItemWarnings.style.display = 'none';
accordionItemErrors.style.display = 'none';
listWarnings.innerHTML = '';
listErrors.innerHTML = '';
listWarnings.textContent = '';
listErrors.textContent = '';
resetButtons();
}

Expand Down Expand Up @@ -73,7 +73,7 @@ function clean(event) {
resetButtons();
if (json.error) {
alertError.style.display = 'block';
messageError.innerHTML = json.error;
messageError.textContent = json.error;
}
if (json.url && json.url.length > 0) {
// file rendering is successful
Expand All @@ -89,6 +89,6 @@ function clean(event) {
.catch((error) => {
resetButtons();
alertError.style.display = 'block';
messageError.innerHTML = error;
messageError.textContent = error;
});
}

0 comments on commit 417369a

Please sign in to comment.