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