From 85719df1dbb8c956e071096e1300b1548c7bf2df Mon Sep 17 00:00:00 2001 From: niclaz <83479948+niclaz@users.noreply.github.com> Date: Wed, 28 Aug 2024 21:39:03 +0200 Subject: [PATCH] Extending the caption section of schema - regex to include URLs in index.yaml Following up on this error: https://github.com/web3privacy/data/actions/runs/10602350927/job/29384187270 Investigated to find that the error was because the caption entry of a speaker had many URL links within then, so breaking the configuration - added the following regex to the pattern for caption: ``` '^((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)' ``` Tested the regex expression in https://regex101.com/ first to ensure it worked with url format --- schema/index.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/schema/index.yaml b/schema/index.yaml index ed1b0de..15c7ecd 100644 --- a/schema/index.yaml +++ b/schema/index.yaml @@ -116,6 +116,7 @@ $defs: type: string caption: type: string + pattern: '^((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)' country: type: string pattern: '^[a-z]{2}$' @@ -214,4 +215,4 @@ properties: research: type: array items: - $ref: "#/$defs/research" \ No newline at end of file + $ref: "#/$defs/research"