Better way of checking tags
This commit is contained in:
parent
6bd68f6946
commit
090ca86f3e
1 changed files with 9 additions and 9 deletions
|
@ -36,17 +36,17 @@ async function Post() {
|
||||||
// Adding tags
|
// Adding tags
|
||||||
let TempText = Text;
|
let TempText = Text;
|
||||||
let Tags = TagsInputArea.value.split(";");
|
let Tags = TagsInputArea.value.split(";");
|
||||||
if (Tags.length >= 1) {
|
if (Tags[0] != "") {
|
||||||
TempText += "<br/><br/>";
|
TempText += "<br/><br/>";
|
||||||
}
|
for (let i of Tags) {
|
||||||
for (let i of Tags) {
|
while (i[0] == " ") {
|
||||||
while (i[0] == " ") {
|
i = i.substring(1, i.length);
|
||||||
i = i.substring(1, i.length);
|
}
|
||||||
|
if (i[0] != "#" && i.length != 0) {
|
||||||
|
i = "#" + i;
|
||||||
|
}
|
||||||
|
TempText += i + " ";
|
||||||
}
|
}
|
||||||
if (i[0] != "#" && i.length != 0) {
|
|
||||||
i = "#" + i;
|
|
||||||
}
|
|
||||||
TempText += i + " ";
|
|
||||||
}
|
}
|
||||||
switch(Visible) {
|
switch(Visible) {
|
||||||
case "Public":
|
case "Public":
|
||||||
|
|
Loading…
Add table
Reference in a new issue