|
3 | 3 |
|
4 | 4 | import os
|
5 | 5 | import json
|
6 |
| -import unicodedata |
7 | 6 | from pathlib import Path
|
8 | 7 | from dataclasses import dataclass
|
9 | 8 | from albert import *
|
10 | 9 |
|
11 | 10 | md_iid = "3.0"
|
12 |
| -md_version = "1.7" |
| 11 | +md_version = "1.8" |
13 | 12 | md_name = "VSCode projects"
|
14 | 13 | md_description = "Open VSCode projects"
|
15 | 14 | md_url = "https://github.com/albertlauncher/python/tree/master/vscode_projects"
|
@@ -302,11 +301,6 @@ def _initConfiguration(self):
|
302 | 301 | if terminalCommand is not None:
|
303 | 302 | self._terminalCommand = terminalCommand
|
304 | 303 |
|
305 |
| - # Strings are normalized to match without accents and casing |
306 |
| - def _normalizeString(self, input: str) -> str: |
307 |
| - return ''.join(c for c in unicodedata.normalize('NFD', input) |
308 |
| - if unicodedata.category(c) != 'Mn').lower() |
309 |
| - |
310 | 304 | def handleTriggerQuery(self, query):
|
311 | 305 | if not query.isValid:
|
312 | 306 | return
|
@@ -494,7 +488,7 @@ def _getStorageConfig(self, path: str) -> CachedConfig:
|
494 | 488 | # Inject the project
|
495 | 489 | c.projects.append(Project(
|
496 | 490 | displayName=displayName,
|
497 |
| - name=self._normalizeString(displayName), |
| 491 | + name=displayName, |
498 | 492 | path=recentPath,
|
499 | 493 | tags=[],
|
500 | 494 | ))
|
@@ -536,15 +530,15 @@ def _getProjectManagerConfig(self, path: str) -> CachedConfig:
|
536 | 530 |
|
537 | 531 | project = Project(
|
538 | 532 | displayName=p["name"],
|
539 |
| - name=self._normalizeString(p["name"]), |
| 533 | + name=p["name"], |
540 | 534 | path=rootPath,
|
541 | 535 | tags=[],
|
542 | 536 | )
|
543 | 537 |
|
544 | 538 | # Search against the query string
|
545 | 539 | if "tags" in p:
|
546 | 540 | for tag in p["tags"]:
|
547 |
| - project.tags.append(self._normalizeString(tag)) |
| 541 | + project.tags.append(tag) |
548 | 542 |
|
549 | 543 | c.projects.append(project)
|
550 | 544 |
|
|
0 commit comments