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 @@
1import { hljs } from '../../lib.js';1import { hljs } from '../../lib.js';
2import { t } from '../i18n.js';
2import { SlashCommandAbortController } from './SlashCommandAbortController.js';3import { SlashCommandAbortController } from './SlashCommandAbortController.js';
3import { SlashCommandArgument, SlashCommandNamedArgument } from './SlashCommandArgument.js';4import { SlashCommandArgument, SlashCommandNamedArgument } from './SlashCommandArgument.js';
4import { SlashCommandClosure } from './SlashCommandClosure.js';5import { SlashCommandClosure } from './SlashCommandClosure.js';
@@ -260,6 +261,15 @@ export class SlashCommand {
260 ].filter(it=>it).join('\n');261 ].filter(it=>it).join('\n');
261 head.append(src);262 head.append(src);
262 }263 }
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 }
263 specs.append(head);273 specs.append(head);
264 }274 }
265 const body = document.createElement('div'); {275 const body = document.createElement('div'); {
public/style.css+9 -0
@@ -2086,6 +2086,15 @@ body[data-stscript-style] .hljs.language-stscript {
2086 }2086 }
2087 }2087 }
20882088
2089 >.head>.rawQuotes {
2090 padding: 0 0.5em;
2091 cursor: help;
2092
2093 &:hover {
2094 text-decoration: 1px dotted underline;
2095 }
2096 }
2097
2089 >.head>.source {2098 >.head>.source {
2090 padding: 0 0.5em;2099 padding: 0 0.5em;
2091 cursor: help;2100 cursor: help;