Skip to content

Commit

Permalink
Merge pull request MycroftAI#977 from MycroftAI/bugfix/metaeditor-par…
Browse files Browse the repository at this point in the history
…sing

Fix several minor bugs in the meta editor
  • Loading branch information
krisgesling authored Apr 27, 2019
2 parents 2ab2f69 + f722cdc commit 0c0ad74
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions meta_editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -583,11 +583,11 @@
categoryEl[i].checked = true;
if (categories.indexOf("**"+name+"**") != -1) {
document.getElementById("for_"+id).className = "primary_category";
leftovers.replace("**"+name+"**", "");
leftovers = leftovers.replace("**"+name+"**", "");
}
else {
document.getElementById("for_"+id).className = "";
leftovers.replace(name, "");
leftovers = leftovers.replace(name, "");
}
} else {
categoryEl[i].checked = false;
Expand All @@ -607,7 +607,7 @@
'<span>Tags are single word identifiers, such as #kids, #crypto and are used for searching.</span>';
var elTag = document.getElementById("tag_1");
for (var i = 0; i < tags.length; i++) {
elTag.value = strip(tags[i].replaceAll("#", ""));
elTag.value = strip(tags[i]);
elTag = addNext(elTag, 'tag_');
}

Expand Down Expand Up @@ -769,17 +769,17 @@
markdown += " " + elName.value + "\n";

markdown += elShortDesc.value + "\n\n";
markdown += "## About \n";
markdown += "## About\n";
markdown += elLongDesc.value + "\n\n";

markdown += "## Examples \n";
markdown += "## Examples\n";
for (var i = 1; ; i++) {
var ex = document.getElementById("ex_" + i);
if (!ex) break;
if (ex.value != "") markdown += '* "' + ex.value + '"\n';
}

markdown += "\n## Credits \n";
markdown += "\n## Credits\n";
for (var i = 1; ; i++) {
var ex = document.getElementById("author_" + i);
if (!ex) break;
Expand All @@ -800,7 +800,7 @@
}

var categoryEl = document.getElementsByClassName("category_section");
markdown += "\n## Category" + "\n";
markdown += "\n## Category\n";
for (var i = 0; i < categoryEl.length; i++) {
if (categoryEl[i].checked)
{
Expand Down

0 comments on commit 0c0ad74

Please sign in to comment.