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:
Izai Alejandro Zalles Merino 2025-10-13 09:33:45 -04:00
parent d822863b97
commit a4f40405ef

View file

@ -42,8 +42,20 @@ class FromMorseCode extends Operation {
pattern: "(?:^[-. \\n]{5,}$|^[_. \\n]{5,}$|^(?:dash|dot| |\\n){5,}$)",
flags: "i",
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"]
}];
}
/**