<div class="gmail_quote">On Tue, May 11, 2010 at 4:33 PM, V.Krishn <span dir="ltr">&lt;<a href="mailto:vkrishn@insteps.net">vkrishn@insteps.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Is there a variable that keeps track of line number of the wiki page being<br>
processed?<br><br></blockquote><div>Pmwiki is more &quot;rule-based&quot; than &quot;line-number-based&quot;.  At certain stages I believe the rule-processor does process a line at a time, but it&#39;s more helpful to think of pmwiki as being a series of &quot;smart search-and-replace&quot; operations that operate over the whole text -- line-by-line may occur, but usually identifying the rule is much more important than identifying the line.</div>
<div><br></div><div>If finding the rule would be helpful you can look in <a href="http://www.pmwiki.org/wiki/Cookbook/DebuggingForCookbookAuthors">http://www.pmwiki.org/wiki/Cookbook/DebuggingForCookbookAuthors</a> and search for &quot;markuptohtml&quot; --  you will find a way that can be helpful in identifying which rule caused a certain change.  Do note the comments about the size of the logfile and the slow-down it causes -- this is a temporary debugging step rather than something that can be left in a live site...</div>
<div><br></div><div>If you already know the rule you are working with and need to know the line number of the page text there may be something you can trace out in MarkupToHTML(), but in looking through that function just now I can&#39;t find anything line-based unless I&#39;m just missing it...  ($text is typically a string, not an array, as I read it, particularly when called from HandleBrowse()...)</div>
<div><br></div><div>-Peter</div></div>