Skip to content

Commit

Permalink
Improve the regex.
Browse files Browse the repository at this point in the history
  • Loading branch information
wRAR committed Oct 23, 2024
1 parent 35921c9 commit ac59dc3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test_serp.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def test_metadata():
{"type": "null"},
],
"description": "Input 1 search query per line (e.g. foo bar).",
"pattern": ".*\\S+.*",
"pattern": r"(.|\r?\n)*\S+(.|\r?\n)*",
"title": "Search Queries",
"widget": "textarea",
},
Expand Down
2 changes: 1 addition & 1 deletion zyte_spider_templates/spiders/serp.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class SearchQueriesParam(BaseModel):
description="Input 1 search query per line (e.g. foo bar).",
json_schema_extra={
"widget": "textarea",
"pattern": r".*\S+.*",
"pattern": r"(.|\r?\n)*\S+(.|\r?\n)*",
},
)

Expand Down

0 comments on commit ac59dc3

Please sign in to comment.