This repository was archived by the owner on Aug 1, 2024. It is now read-only.

Description
When testing the alpha deployment of the rechtsinfo application, I was having the following usability suggestion:
- If the search query looks like a law / paragraph ("§"/"Art."/"Art"/"Artikel" + " " + a number + " " + an alphanumeric string (the legal abbreviation)), and
- if there is exactly one search result,
-> redirect to the paragraph/law page, instead of rendering the search results list.
This increases the usability, because I'll save one click when intending to go to a certain law or pargraph. Since the redirect will only happen, when there is exactly one search result, you won't accidentally miss other references to the law you might be searching for. I also assume, that this is going to be a common use case: looking for one specific law.
A sample regex to identify such law-like queries could be:
/(§|Art\.?|Artikel) [0-9]+[a-z]? [A-Za-z-]+/