Improved #51 and fixed #80

This commit is contained in:
Simon Cambier
2022-07-14 08:24:31 +02:00
parent cdce2b5f0e
commit 6b64cd80b4
4 changed files with 14 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
import type { CachedMetadata } from 'obsidian'
import { Platform, type CachedMetadata } from 'obsidian'
import {
excerptAfter,
excerptBefore,
@@ -164,3 +164,7 @@ export function getTagsFromMetadata(metadata: CachedMetadata | null): string[] {
export function removeDiacritics(str: string): string {
return str.normalize('NFD').replace(/\p{Diacritic}/gu, '')
}
export function getCtrlKeyLabel(): 'ctrl' | '⌘' {
return Platform.isMacOS ? '⌘' : 'ctrl'
}