mirror of
https://github.com/peritus/obsidian-interactive-ratings.git
synced 2026-07-22 12:20:31 +00:00
Fixed import issue in editor-extension/index.ts - added missing import for ratingViewPlugin before using it in the export array. All type checks and builds now pass successfully.
16 lines
No EOL
520 B
TypeScript
16 lines
No EOL
520 B
TypeScript
import { SYMBOL_PATTERNS } from '../constants';
|
|
import { SymbolSet } from '../types';
|
|
|
|
/**
|
|
* Get the appropriate symbol set for a given rating pattern
|
|
*/
|
|
export function getSymbolSetForPattern(pattern: string): SymbolSet | null {
|
|
// Find the symbol set that matches the pattern
|
|
for (const symbolSet of SYMBOL_PATTERNS) {
|
|
if (pattern.includes(symbolSet.full) || pattern.includes(symbolSet.empty) ||
|
|
(symbolSet.half && pattern.includes(symbolSet.half))) {
|
|
return symbolSet;
|
|
}
|
|
}
|
|
return null;
|
|
} |