feat(magic): improve Morse detection (slash-separated variants)
- Add Magic checks for common Morse format using forward slashes between words - Cover dot/dash, underscore/dot, and dash/dot literal formats with slashes Authored-by: Izai Alejandro Zalles Merino <zallesrene@gmail.com>
This commit is contained in:
parent
d822863b97
commit
a4f40405ef
@ -42,8 +42,20 @@ class FromMorseCode extends Operation {
|
|||||||
pattern: "(?:^[-. \\n]{5,}$|^[_. \\n]{5,}$|^(?:dash|dot| |\\n){5,}$)",
|
pattern: "(?:^[-. \\n]{5,}$|^[_. \\n]{5,}$|^(?:dash|dot| |\\n){5,}$)",
|
||||||
flags: "i",
|
flags: "i",
|
||||||
args: ["Space", "Line feed"]
|
args: ["Space", "Line feed"]
|
||||||
}
|
},
|
||||||
];
|
{
|
||||||
|
pattern: "^(?=.*/)[-./ \n]{5,}$",
|
||||||
|
args: ["Space", "Forward slash"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
pattern: "^(?=.*/)[_. /\n]{5,}$",
|
||||||
|
args: ["Space", "Forward slash"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
pattern: "^(?=.*/)(?:dash|dot| |/|\n){5,}$",
|
||||||
|
flags: "i",
|
||||||
|
args: ["Space", "Forward slash"]
|
||||||
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user