Files
SnowLuma/.pnpm-store/v11/files/92/e4a5c0969307c345bc28ca336454bde206761088073607064b7a8a1da58d40ac7a29e53aed21ac1482085c93d30c12d370a66922ab3a3eb16f31504151b5b8
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

33 lines
761 B
Plaintext

import Options from '../../Options'
import { MatchEstimated } from '../../types'
export default (options: Options, match: MatchEstimated) => {
if (match.pattern !== 'wordSequence') {
return null
}
let warning = null
const suggestions: string[] = []
// Warning for common word sequences
if (match.wordCount >= 3) {
warning = options.translations.warnings.sequences
}
// Suggestions based on sequence characteristics
if (match.ascending) {
suggestions.push(options.translations.suggestions.sequences)
} else {
suggestions.push(options.translations.suggestions.anotherWord)
}
if (match.wordCount > 2) {
suggestions.push(options.translations.suggestions.useWords)
}
return {
warning,
suggestions,
}
}