Add raw quotes indicator in slash command autocomplete
| @@ -1,4 +1,5 @@ | |||
| 1 | import { hljs } from '../../lib.js'; | 1 | import { hljs } from '../../lib.js'; |
| 2 | import { t } from '../i18n.js'; | ||
| 2 | import { SlashCommandAbortController } from './SlashCommandAbortController.js'; | 3 | import { SlashCommandAbortController } from './SlashCommandAbortController.js'; |
| 3 | import { SlashCommandArgument, SlashCommandNamedArgument } from './SlashCommandArgument.js'; | 4 | import { SlashCommandArgument, SlashCommandNamedArgument } from './SlashCommandArgument.js'; |
| 4 | import { SlashCommandClosure } from './SlashCommandClosure.js'; | 5 | import { 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'); { |
| @@ -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 | >.head>.source { | 2098 | >.head>.source { |
| 2090 | padding: 0 0.5em; | 2099 | padding: 0 0.5em; |
| 2091 | cursor: help; | 2100 | cursor: help; |