Skip to content

Commit 2213072

Browse files
authored
Merge pull request #1808 from UlrichB22/fix_itemlist
Fix search result highlighting for itemlist macro
2 parents b4ba765 + e1ac3f7 commit 2213072

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

src/moin/help/help-en/MoinWikiMacros.data

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -366,30 +366,30 @@ the "startswith" parameter is more efficient than the equivalent "regex" express
366366
{{{
367367
Those items containing the string "Text" anywhere in the full path name:
368368

369-
<<ItemList(item="OtherTextItems", regex="Text")>>
369+
<<ItemList(item="help-en/OtherTextItems", regex="Text")>>
370370

371371
Those items containing the string "Text" only in the descendent's name:
372372

373-
<<ItemList(item="OtherTextItems", regex="^.*/.*Text")>>
373+
<<ItemList(item="help-en/OtherTextItems", regex="^.*/.*Text")>>
374374

375375
Those items containing a vowel as the 3rd-to-last character:
376376

377-
<<ItemList(item="OtherTextItems", regex="(?i)[aeiou].{2}$")>>
377+
<<ItemList(item="help-en/OtherTextItems", regex="(?i)[aeiou].{2}$")>>
378378
}}}
379379

380380
'''Result:'''
381381

382382
Those items containing the string "Text" anywhere in the full path name:
383383

384-
<<ItemList(item="OtherTextItems", regex="Text")>>
384+
<<ItemList(item="help-en/OtherTextItems", regex="Text")>>
385385

386386
Those items containing the string "Text" only in the descendent's name:
387387

388-
<<ItemList(item="OtherTextItems", regex="^.*/.*Text")>>
388+
<<ItemList(item="help-en/OtherTextItems", regex="^.*/.*Text")>>
389389

390390
Those items containing a vowel as the 3rd-to-last character:
391391

392-
<<ItemList(item="OtherTextItems", regex="(?i)[aeiou].{2}$")>>
392+
<<ItemList(item="help-en/OtherTextItems", regex="(?i)[aeiou].{2}$")>>
393393

394394

395395
===== The "display" parameter =====
@@ -402,19 +402,19 @@ displays the subitems of help-en/creole.
402402
{{{
403403
Displayed using "FullPath" (the default, see examples above):
404404

405-
<<ItemList(item="OtherTextItems", regex="PlainText", display="FullPath")>>
405+
<<ItemList(item="help-en/OtherTextItems", regex="PlainText", display="FullPath")>>
406406

407407
Displayed using "ChildPath":
408408

409-
<<ItemList(item="OtherTextItems", regex="PlainText", display="ChildPath")>>
409+
<<ItemList(item="help-en/OtherTextItems", regex="PlainText", display="ChildPath")>>
410410

411411
Displayed using "ChildName":
412412

413-
<<ItemList(item="OtherTextItems", regex="PlainText", display="ChildName")>>
413+
<<ItemList(item="help-en/OtherTextItems", regex="PlainText", display="ChildName")>>
414414

415415
Displayed using "UnCameled":
416416

417-
<<ItemList(item="OtherTextItems", regex="PlainText", display="UnCameled")>>
417+
<<ItemList(item="help-en/OtherTextItems", regex="PlainText", display="UnCameled")>>
418418

419419
Displayed using "ItemTitle":
420420

@@ -425,19 +425,19 @@ Displayed using "ItemTitle":
425425

426426
Displayed using "FullPath":
427427

428-
<<ItemList(item="OtherTextItems", regex="PlainText", display="FullPath")>>
428+
<<ItemList(item="help-en/OtherTextItems", regex="PlainText", display="FullPath")>>
429429

430430
Displayed using "ChildPath":
431431

432-
<<ItemList(item="OtherTextItems", regex="PlainText", display="ChildPath")>>
432+
<<ItemList(item="help-en/OtherTextItems", regex="PlainText", display="ChildPath")>>
433433

434434
Displayed using "ChildName":
435435

436-
<<ItemList(item="OtherTextItems", regex="PlainText", display="ChildName")>>
436+
<<ItemList(item="help-en/OtherTextItems", regex="PlainText", display="ChildName")>>
437437

438438
Displayed using "UnCameled":
439439

440-
<<ItemList(item="OtherTextItems", regex="PlainText", display="UnCameled")>>
440+
<<ItemList(item="help-en/OtherTextItems", regex="PlainText", display="UnCameled")>>
441441

442442
Displayed using "ItemTitle":
443443

src/moin/help/help-en/MoinWikiMacros.meta

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"address": "127.0.0.1",
44
"comment": "",
55
"contenttype": "text/x.moin.wiki;charset=utf-8",
6-
"dataid": "3783c3fdda3b43b1a4ec0f3300c22bdb",
6+
"dataid": "63b9dec909e04f80938585644ae7d744",
77
"externallinks": [
88
"https://fontawesome.com/search?o=r&m=free",
99
"https://moinmo.in/HelpOnMacros/Include"
@@ -19,16 +19,16 @@
1919
],
2020
"itemtype": "default",
2121
"language": "en",
22-
"mtime": 1730231040,
22+
"mtime": 1732105280,
2323
"name": [
2424
"MoinWikiMacros"
2525
],
2626
"name_old": [],
2727
"namespace": "help-en",
2828
"rev_number": 1,
29-
"revid": "931016b31ee144e7879f2ab37ebc3caa",
30-
"sha1": "d9c425e1ccc9d1a9d862b50ea46848558d6028cf",
31-
"size": 14886,
29+
"revid": "230f1f657b5d4725b5852f58e022309a",
30+
"sha1": "7e9fe2f63fb8f7c171f86120fd48801cc58a9afd",
31+
"size": 14998,
3232
"summary": "",
3333
"tags": [
3434
"macros",

src/moin/macros/_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def create_pagelink_list(self, pagenames, alternative, ordered=False, display="F
222222
url = str(iri.Iri(scheme="wiki", authority="", path="/" + fqname))
223223

224224
if display == "FullPath":
225-
linkname = pagename
225+
linkname = fqname
226226
elif display == "ChildPath":
227227
index = fqname.rfind("/")
228228
if index == -1:

0 commit comments

Comments
 (0)