1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-24 03:54:20 +00:00

Allow any non-space characters as quoted user name

This commit is contained in:
Steffo 2024-08-25 12:54:06 +02:00
parent fccc97bca2
commit 418d68de49
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0

View file

@ -27,7 +27,7 @@ impl FromStr for DiarioArgs {
type Err = anyhow::Error;
fn from_str(s: &str) -> Result<Self, Self::Err> {
static REGEX: Lazy<Regex> = Lazy::new(|| Regex::new(r#" *(?:\[(?<warning>.+)])? *"(?<quote>.+)"[, ]*(?:[-–—]+(?<quoted>\w+)(?:, *(?<context>.+))?)?"#).unwrap());
static REGEX: Lazy<Regex> = Lazy::new(|| Regex::new(r#" *(?:\[(?<warning>.+)])? *"(?<quote>.+)"[, ]*(?:[-–—]+(?<quoted>[^\n,]+)(?:, *(?<context>.+))?)?"#).unwrap());
let captures = REGEX.captures(s);