From 4fa22612f5ccb7fd403b29b80c6677019275f02a Mon Sep 17 00:00:00 2001 From: alemi Date: Sat, 19 Oct 2024 22:05:29 +0200 Subject: [PATCH] fix: regex extractor add newline and example --- postwoman.toml | 1 + src/model/endpoint.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/postwoman.toml b/postwoman.toml index 4e857ea..265c926 100644 --- a/postwoman.toml +++ b/postwoman.toml @@ -14,6 +14,7 @@ extract = { type = "discard" } [route.notfound] url = "https://api.alemi.dev/not-found" expect = 404 +extract = { type = "regex", pattern = 'nginx/[0-9\.]+' } [route.debug] url = "https://api.alemi.dev/debug" diff --git a/src/model/endpoint.rs b/src/model/endpoint.rs index 4d2be80..a1ba1ec 100644 --- a/src/model/endpoint.rs +++ b/src/model/endpoint.rs @@ -166,6 +166,7 @@ impl Endpoint { .ok_or_else(|| PostWomanError::NoMatch(body.clone()))? .as_str() .to_string() + + "\n" }, // bare string defaults to JQL query StringOr::T(Extractor::Jql { query }) | StringOr::Str(query) => {