Browse Source

logs-content: Fixed quote detection in text post not detecting double-apostrpohes (KVIrc has anti-RP sentiments among their dev team)

1.2
Gisle Aune 5 years ago
parent
commit
599ca83f0f
  1. 2
      marko/page/logs-content/components/post/component.js

2
marko/page/logs-content/components/post/component.js

@ -88,7 +88,7 @@ module.exports = class {
this.state.text = this.state.text.slice(1).trim(); this.state.text = this.state.text.slice(1).trim();
} }
if (input.post.kind === "text" && !this.state.text.includes("\"") && !this.state.text.includes("|")) {
if (input.post.kind === "text" && !this.state.text.includes("\"") && !this.state.text.includes("\''") && !this.state.text.includes("|")) {
const colonIndex = this.state.text.indexOf(": "); const colonIndex = this.state.text.indexOf(": ");
if (colonIndex != -1 && colonIndex < this.state.text.indexOf(" ")) { if (colonIndex != -1 && colonIndex < this.state.text.indexOf(" ")) {
this.state.text = this.state.text.replace(": ", ": \"") + "\""; this.state.text = this.state.text.replace(": ", ": \"") + "\"";

Loading…
Cancel
Save