diff --git a/extensions/git/src/timelineProvider.ts b/extensions/git/src/timelineProvider.ts index e43a2a0b84f..f6e543257e2 100644 --- a/extensions/git/src/timelineProvider.ts +++ b/extensions/git/src/timelineProvider.ts @@ -166,8 +166,7 @@ export class GitTimelineProvider implements TimelineProvider { if (showAuthor) { item.description = c.authorName; } - // allow-any-unicode-next-line - item.detail = `${c.authorName} (${c.authorEmail}) — ${c.hash.substr(0, 8)}\n${dateFormatter.format(date)}\n\n${message}`; + item.detail = `${c.authorName} (${c.authorEmail}) \u2014 ${c.hash.substr(0, 8)}\n${dateFormatter.format(date)}\n\n${message}`; const cmd = this.commands.resolveTimelineOpenDiffCommand(item, uri); if (cmd) { @@ -192,8 +191,7 @@ export class GitTimelineProvider implements TimelineProvider { // TODO@eamodio: Replace with a better icon -- reflecting its status maybe? item.iconPath = new ThemeIcon('git-commit'); item.description = ''; - // allow-any-unicode-next-line - item.detail = localize('git.timeline.detail', '{0} — {1}\n{2}\n\n{3}', you, localize('git.index', 'Index'), dateFormatter.format(date), Resource.getStatusText(index.type)); + item.detail = localize('git.timeline.detail', '{0} \u2014 {1}\n{2}\n\n{3}', you, localize('git.index', 'Index'), dateFormatter.format(date), Resource.getStatusText(index.type)); const cmd = this.commands.resolveTimelineOpenDiffCommand(item, uri); if (cmd) { @@ -215,8 +213,7 @@ export class GitTimelineProvider implements TimelineProvider { // TODO@eamodio: Replace with a better icon -- reflecting its status maybe? item.iconPath = new ThemeIcon('git-commit'); item.description = ''; - // allow-any-unicode-next-line - item.detail = localize('git.timeline.detail', '{0} — {1}\n{2}\n\n{3}', you, localize('git.workingTree', 'Working Tree'), dateFormatter.format(date), Resource.getStatusText(working.type)); + item.detail = localize('git.timeline.detail', '{0} \u2014 {1}\n{2}\n\n{3}', you, localize('git.workingTree', 'Working Tree'), dateFormatter.format(date), Resource.getStatusText(working.type)); const cmd = this.commands.resolveTimelineOpenDiffCommand(item, uri); if (cmd) { diff --git a/extensions/typescript-language-features/src/utils/previewer.ts b/extensions/typescript-language-features/src/utils/previewer.ts index a443efba037..c6d1c942050 100644 --- a/extensions/typescript-language-features/src/utils/previewer.ts +++ b/extensions/typescript-language-features/src/utils/previewer.ts @@ -90,8 +90,7 @@ function getTagDocumentation( if (!doc) { return label; } - // allow-any-unicode-next-line - return label + (doc.match(/\r\n|\n/g) ? ' \n' + processInlineTags(doc) : ` — ${processInlineTags(doc)}`); + return label + (doc.match(/\r\n|\n/g) ? ' \n' + processInlineTags(doc) : ` \u2014 ${processInlineTags(doc)}`); } } @@ -101,8 +100,7 @@ function getTagDocumentation( if (!text) { return label; } - // allow-any-unicode-next-line - return label + (text.match(/\r\n|\n/g) ? ' \n' + text : ` — ${text}`); + return label + (text.match(/\r\n|\n/g) ? ' \n' + text : ` \u2014 ${text}`); } export function plainWithLinks( diff --git a/src/vs/base/common/keybindingLabels.ts b/src/vs/base/common/keybindingLabels.ts index 0c2f1a93468..62e905a4bb4 100644 --- a/src/vs/base/common/keybindingLabels.ts +++ b/src/vs/base/common/keybindingLabels.ts @@ -54,8 +54,7 @@ export class ModifierLabelProvider { */ export const UILabelProvider = new ModifierLabelProvider( { - // allow-any-unicode-next-line - ctrlKey: '⌃', + ctrlKey: '\u2303', shiftKey: '⇧', altKey: '⌥', metaKey: '⌘', diff --git a/src/vs/editor/browser/controller/textAreaState.ts b/src/vs/editor/browser/controller/textAreaState.ts index 4c240bfd378..cf8846dbc02 100644 --- a/src/vs/editor/browser/controller/textAreaState.ts +++ b/src/vs/editor/browser/controller/textAreaState.ts @@ -172,8 +172,7 @@ export class TextAreaState { if (potentialEmojiInput !== null && potentialEmojiInput.length > 0) { // now we check that this is indeed an emoji // emojis can grow quite long, so a length check is of no help - // allow-any-unicode-next-line - // e.g. 1F3F4 E0067 E0062 E0065 E006E E0067 E007F ; fully-qualified # 🏴󠁧󠁢󠁥󠁮󠁧󠁿 England + // e.g. 1F3F4 E0067 E0062 E0065 E006E E0067 E007F -- flag of England // Oftentimes, emojis use Variation Selector-16 (U+FE0F), so that is a good hint // http://emojipedia.org/variation-selector-16/ diff --git a/src/vs/workbench/browser/workbench.contribution.ts b/src/vs/workbench/browser/workbench.contribution.ts index bf60658ac0c..7dbe26ca935 100644 --- a/src/vs/workbench/browser/workbench.contribution.ts +++ b/src/vs/workbench/browser/workbench.contribution.ts @@ -421,8 +421,7 @@ const registry = Registry.as(ConfigurationExtensions.Con }, 'window.titleSeparator': { 'type': 'string', - // allow-any-unicode-next-line - 'default': isMacintosh ? ' — ' : ' - ', + 'default': isMacintosh ? ' \u2014 ' : ' - ', 'markdownDescription': localize("window.titleSeparator", "Separator used by `window.title`.") }, 'window.menuBarVisibility': { diff --git a/src/vs/workbench/contrib/debug/browser/debugActionViewItems.ts b/src/vs/workbench/contrib/debug/browser/debugActionViewItems.ts index 310e7549105..b68d7d7036c 100644 --- a/src/vs/workbench/contrib/debug/browser/debugActionViewItems.ts +++ b/src/vs/workbench/contrib/debug/browser/debugActionViewItems.ts @@ -27,8 +27,7 @@ const $ = dom.$; export class StartDebugActionViewItem extends BaseActionViewItem { - // allow-any-unicode-next-line - private static readonly SEPARATOR = '─────────'; + private static readonly SEPARATOR = '\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500'; private container!: HTMLElement; private start!: HTMLElement; diff --git a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts index e3712271e12..b2d08fc2d68 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionEditor.ts @@ -1550,10 +1550,8 @@ export class ExtensionEditor extends EditorPane { $('td', undefined, l.id), $('td', undefined, l.name), $('td', undefined, ...join(l.extensions.map(ext => $('code', undefined, ext)), ' ')), - // allow-any-unicode-next-line - $('td', undefined, document.createTextNode(l.hasGrammar ? '✔︎' : '—')), - // allow-any-unicode-next-line - $('td', undefined, document.createTextNode(l.hasSnippets ? '✔︎' : '—')) + $('td', undefined, document.createTextNode(l.hasGrammar ? '✔︎' : '\u2014')), + $('td', undefined, document.createTextNode(l.hasSnippets ? '✔︎' : '\u2014')) )) ) ); diff --git a/src/vs/workbench/contrib/output/browser/outputView.ts b/src/vs/workbench/contrib/output/browser/outputView.ts index 9db7a355a31..3ebd3590841 100644 --- a/src/vs/workbench/contrib/output/browser/outputView.ts +++ b/src/vs/workbench/contrib/output/browser/outputView.ts @@ -271,8 +271,7 @@ export class OutputEditor extends AbstractTextResourceEditor { class SwitchOutputActionViewItem extends SelectActionViewItem { - // allow-any-unicode-next-line - private static readonly SEPARATOR = '─────────'; + private static readonly SEPARATOR = '\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500'; private outputChannels: IOutputChannelDescriptor[] = []; private logChannels: IOutputChannelDescriptor[] = []; diff --git a/src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts b/src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts index f12bf278726..21ab9a92d6e 100644 --- a/src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts +++ b/src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts @@ -1181,8 +1181,7 @@ export class SettingsEditor2 extends EditorPane { const query = this.searchWidget.getValue().trim(); this.delayedFilterLogging.cancel(); - // allow-any-unicode-next-line - await this.triggerSearch(query.replace(/›/g, ' ')); + await this.triggerSearch(query.replace(/\u203A/g, ' ')); if (query && this.searchResultModel) { this.delayedFilterLogging.trigger(() => this.reportFilteringUsed(query, this.searchResultModel!.getUniqueResults())); diff --git a/src/vs/workbench/contrib/preferences/browser/settingsTreeModels.ts b/src/vs/workbench/contrib/preferences/browser/settingsTreeModels.ts index f70a5afeff2..ea6967e593d 100644 --- a/src/vs/workbench/contrib/preferences/browser/settingsTreeModels.ts +++ b/src/vs/workbench/contrib/preferences/browser/settingsTreeModels.ts @@ -521,8 +521,7 @@ export function settingKeyToDisplayFormat(key: string, groupId = ''): { category function wordifyKey(key: string): string { key = key - // allow-any-unicode-next-line - .replace(/\.([a-z0-9])/g, (_, p1) => ` › ${p1.toUpperCase()}`) // Replace dot with spaced '>' + .replace(/\.([a-z0-9])/g, (_, p1) => ` \u203A ${p1.toUpperCase()}`) // Replace dot with spaced '>' .replace(/([a-z0-9])([A-Z])/g, '$1 $2') // Camel case to spacing, fooBar => foo Bar .replace(/^[a-z]/g, match => match.toUpperCase()) // Upper casing all first letters, foo => Foo .replace(/\b\w+\b/g, match => { // Upper casing known acronyms diff --git a/src/vs/workbench/contrib/terminal/browser/terminalActions.ts b/src/vs/workbench/contrib/terminal/browser/terminalActions.ts index c292ceeb876..32699b858aa 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalActions.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalActions.ts @@ -50,8 +50,7 @@ import { ITerminalQuickPickItem } from 'vs/workbench/contrib/terminal/browser/te import { IThemeService } from 'vs/platform/theme/common/themeService'; import { getIconId, getColorClass, getUriClasses } from 'vs/workbench/contrib/terminal/browser/terminalIcon'; -// allow-any-unicode-next-line -export const switchTerminalActionViewItemSeparator = '─────────'; +export const switchTerminalActionViewItemSeparator = '\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500'; export const switchTerminalShowTabsTitle = localize('showTerminalTabs', "Show Tabs"); async function getCwdForSplit(configHelper: ITerminalConfigHelper, instance: ITerminalInstance, folders?: IWorkspaceFolder[], commandService?: ICommandService): Promise { @@ -988,8 +987,7 @@ export function registerTerminalActions() { const cwdLabel = labelService.getUriLabel(URI.file(term.cwd)); return { label: term.title, - // allow-any-unicode-next-line - detail: term.workspaceName ? `${term.workspaceName} ⸱ ${cwdLabel}` : cwdLabel, + detail: term.workspaceName ? `${term.workspaceName} \u2E31 ${cwdLabel}` : cwdLabel, description: term.pid ? String(term.pid) : '', term }; diff --git a/src/vs/workbench/contrib/testing/browser/explorerProjections/display.ts b/src/vs/workbench/contrib/testing/browser/explorerProjections/display.ts index c26642329d4..548ee8b1da8 100644 --- a/src/vs/workbench/contrib/testing/browser/explorerProjections/display.ts +++ b/src/vs/workbench/contrib/testing/browser/explorerProjections/display.ts @@ -3,5 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -// allow-any-unicode-next-line -export const flatTestItemDelimiter = ' › '; +export const flatTestItemDelimiter = ' \u203A '; diff --git a/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts b/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts index 988566b13e7..06df5b9e20a 100644 --- a/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts +++ b/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts @@ -1022,19 +1022,15 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { private static _redirectCharCode(charCode: number): number { switch (charCode) { // allow-any-unicode-next-line - case CharCode.U_IDEOGRAPHIC_FULL_STOP: return CharCode.Period; // CJK 。 => . - // allow-any-unicode-next-line - case CharCode.U_LEFT_CORNER_BRACKET: return CharCode.OpenSquareBracket; // CJK 「 => [ - // allow-any-unicode-next-line - case CharCode.U_RIGHT_CORNER_BRACKET: return CharCode.CloseSquareBracket; // CJK 」 => ] - // allow-any-unicode-next-line - case CharCode.U_LEFT_BLACK_LENTICULAR_BRACKET: return CharCode.OpenSquareBracket; // CJK 【 => [ - // allow-any-unicode-next-line - case CharCode.U_RIGHT_BLACK_LENTICULAR_BRACKET: return CharCode.CloseSquareBracket; // CJK 】 => ] - // allow-any-unicode-next-line - case CharCode.U_FULLWIDTH_SEMICOLON: return CharCode.Semicolon; // CJK ; => ; - // allow-any-unicode-next-line - case CharCode.U_FULLWIDTH_COMMA: return CharCode.Comma; // CJK , => , + // CJK: 。 「 」 【 】 ; , + // map: . [ ] [ ] ; , + case CharCode.U_IDEOGRAPHIC_FULL_STOP: return CharCode.Period; + case CharCode.U_LEFT_CORNER_BRACKET: return CharCode.OpenSquareBracket; + case CharCode.U_RIGHT_CORNER_BRACKET: return CharCode.CloseSquareBracket; + case CharCode.U_LEFT_BLACK_LENTICULAR_BRACKET: return CharCode.OpenSquareBracket; + case CharCode.U_RIGHT_BLACK_LENTICULAR_BRACKET: return CharCode.CloseSquareBracket; + case CharCode.U_FULLWIDTH_SEMICOLON: return CharCode.Semicolon; + case CharCode.U_FULLWIDTH_COMMA: return CharCode.Comma; } return charCode; } diff --git a/src/vs/workbench/services/search/common/getFileResults.ts b/src/vs/workbench/services/search/common/getFileResults.ts index 91fe2623dfd..f2e81f913dd 100644 --- a/src/vs/workbench/services/search/common/getFileResults.ts +++ b/src/vs/workbench/services/search/common/getFileResults.ts @@ -25,8 +25,7 @@ export const getFileResults = ( text = new TextDecoder('utf-16be').decode(bytes); } else { text = new TextDecoder('utf8').decode(bytes); - // allow-any-unicode-next-line - if (text.slice(0, 1000).includes('�') && bytes.includes(0)) { + if (text.slice(0, 1000).includes('\uFFFD') && bytes.includes(0)) { return []; } }