gkrid / dokuwiki-plugin-approve

GNU General Public License v2.0
4 stars 17 forks source link

Little hint in the documentation to understand the filter expressions ;) #40

Closed ooleanderoo closed 3 years ago

ooleanderoo commented 3 years ago

When reading your code I triped over the filter-expression and that it uses the preg_match function of php. With that in mind i now can use the filter much more precise. Maybe a hint in your documentation would be nice for others, too.

To understand how to use it the german page page gave a good overview.

Just one additional info: Your filter is not exactly handling like discribed in the manual i found. It seems that is has problems with blanks even if framed with slashes. In my example i now use the dot as the wildcard character and i also get my desired funcionality.

solewniczak commented 3 years ago

What blanks aren't handled well? Can you provide me some example?

ooleanderoo commented 3 years ago

When I use: filter: /qds.0003/ is shows me every page with names like qds 0003..... like i want if I use: filter: /qds 0003/ with a blank i just get no result.

solewniczak commented 3 years ago

The filter attribute filters the pages by their ids. The page id cannot have space in it. The spaces are automatically converted to underscores. Can you try: filter: /qds_0003/?

ooleanderoo commented 3 years ago

Ah sorry. that was the hint. I'm using the option useheadings so it shows me the titles of a page as name. In this case I mixed it up with the IDs. When I use the IDs as filter there is no problem. My fault.