Add raw quotes indicator in slash command autocomplete

819ce198a8ddf2ec2ff42b170f9bdfba8fb37643

Cohee <18619528+Cohee1207@users.noreply.github.com>

2 files changed, +19 -0Ignore whitespace
public/scripts/slash-commands/SlashCommand.js+10 -0
@@ -1,4 +1,5 @@
11import { hljs } from '../../lib.js';
2+import { t } from '../i18n.js';
23import { SlashCommandAbortController } from './SlashCommandAbortController.js';
34import { SlashCommandArgument, SlashCommandNamedArgument } from './SlashCommandArgument.js';
45import { SlashCommandClosure } from './SlashCommandClosure.js';
@@ -260,6 +261,15 @@ export class SlashCommand {
260261 ].filter(it=>it).join('\n');
261262 head.append(src);
262263 }
264+ if (this.rawQuotes) {
265+ const rawQuotes = document.createElement('div'); {
266+ rawQuotes.classList.add('rawQuotes');
267+ rawQuotes.classList.add('fa-solid');
268+ rawQuotes.classList.add('fa-quote-left');
269+ rawQuotes.title = t`Does not alter quoted literal unnamed arguments`;
270+ head.append(rawQuotes);
271+ }
272+ }
263273 specs.append(head);
264274 }
265275 const body = document.createElement('div'); {
public/style.css+9 -0
@@ -2086,6 +2086,15 @@ body[data-stscript-style] .hljs.language-stscript {
20862086 }
20872087 }
20882088
2089+ >.head>.rawQuotes {
2090+ padding: 0 0.5em;
2091+ cursor: help;
2092+
2093+ &:hover {
2094+ text-decoration: 1px dotted underline;
2095+ }
2096+ }
2097+
20892098 >.head>.source {
20902099 padding: 0 0.5em;
20912100 cursor: help;