[pmwiki-devel] Update Re: Using "!#anchor heading" markup
John Rankin
john.rankin at affinity.co.nz
Mon Jun 1 19:08:09 PDT 2026
On 01/06/2026 1:58 pm, John Rankin wrote:
> On 31/05/2026 8:16 pm, Petko Yotov wrote:
>
>> On 30/05/2026 04:45, John Rankin wrote:
>> <snip>
>>
>> I would not render a character for a removed anchor with duplicate
>> identifiers, because recipes and pagelists can include parts of
>> multiple pages that are wrapped in the same anchors:
>>
>> (:include {=$FullName}#start#end:)
>> (:b3-list:)
>>
>> If duplicate anchors are replaced with �, these will appear as new
>> weird characters in pagelists that worked fine before.
>
> Yes, I agree. The purpose of displaying � for duplicate idNames is to
> make it easier for writers to create a correct page table of contents.
> So I think pagetoc should limit its error reporting to
> ^(!!|Q:)(##?idName|[[##?idName]]) instances.
>
> <snip>
On reflection, it's better for the page toc recipe to be simple and
consistent in treating idNames:
- !!([[##idName]] or ##idName) produces a visible anchor (§ or �)
- !!([[#idName]] or #idName) produces a standard anchor, '' for a duplicate
In the latter case, an author can see any duplicates with (:toc
anchors=visible:) if desired.
>> <snip>
>
> Thanks.
>
> JR
>
>
> _______________________________________________
> pmwiki-devel mailing list
> pmwiki-devel at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-devel
More information about the pmwiki-devel
mailing list