[pmwiki-users] Starting #anchor always included

tkcusr tkcusr at yahoo.com
Sat Feb 19 14:49:39 CST 2011

, Patrick R. Michaud wrote:
> On Sat, Feb 19, 2011 at 08:19:13PM +0200, tkcusr wrote:
>>> I'd like to see the example where it "does not happen without the if
>>> block" -- I haven't been able to reproduce that on pmwiki.org.
>> There's example at http://www.pmwiki.org/wiki/Test/Stanchor
>> You'll see that there's no anchor before the second list.
>> [...]
>> Another indication that this is a bug is, only the first anchor gets
>> included but not the second one. If anchors are supposed to be part
>> of an include, then why the second is not included as well?
> Ah, that's an entirely separate thing.  PmWiki is smart enough
> to know that HTML only allows named anchors to appear once per
> page, thus only the first one is ever rendered, and second and
> subsequent anchors of the same name are automatically suppressed
> (so that the output produced by PmWiki remains valid).
> If you look at what gets generated for the Test.Stanchor page,
> you'll see that the anchors there are also being generated
> inside of<p>...</p>  tags.

The anchors in Test.Stanchor are generated because they're not inside 
(:if false:)...(:ifend:), they don't come from (:include:).

When the anchors are inside (:if false:) block the anchor that's 
generated comes from (:include:). If this is normal, and the idea is to 
eliminate duplicates then why the end anchor is also not generated 
there? there's NO #end anchor in this case.

More information about the pmwiki-users mailing list