incubator-jspwiki-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pushker.chau...@gmail.com
Subject Re: Re: stripping the page of wiki markup
Date Thu, 23 Apr 2009 10:12:44 GMT
Hi Janne,

I added code as your suggestions. So now I am using text generated from  
cleanTextRender to buld index on the page content.
However there seems to be some problem whenever I have '[{TableOfContents  
}]' mark up in my page then CleanTextRender possibly generates HTML code or  
somethig similar. For other markups like %%strike and !!!, the html code is  
not generated and I get pure text. Its just '[{TableOfContents }]' that  
seems to be translated to html (or something similar) code.

How I produce this issue:
1) I create a page named TestPage with the following content
[{TableOfContents }]
!!! Chapter 1
Test page without any helpful info
!! Chapter 1.1
hi

2) I save the page and then I search for keywords like 'href' and 'div'
3) The page that I just created comes as search result

However when I edit TestPage and remove the above contents and just put  
following code
%%strike God is great!!/%?
and save and Then search using 'div' keyword, it does not show any result  
and works correctly.That confirms CleanTextRender did NOT return html  
equivalent for %%strike and thus no html code was used for index creation.  
Note that '<div class="strike">' is html translation for %%strike

So, the problem seems to be with pure text conversion of -  
[{TableOfContents }]

Is this some bug with Clean text renderer, or am I making a mistake  
somewhere.

Please suggest how to resolve it.

Thanks and regards!
Pushker Chaubey



On Apr 21, 2009 10:06pm, Janne Jalkanen <janne.jalkanen@ecyrd.com> wrote:



> Try the CleanTextRenderer. Get a WikiDocument from the  
> JSPWikiMarkupParser, then create a CleanTextRenderer instance and pass  
> the document to it. Look at RenderingManager for help.





> /Janne





> On 21 Apr 2009, at 18:39, pushker.chaubey@gmail.com wrote:







> Hi experts,





> I am new to JSPWIKI.


> I want to do Indexing based on page contents. But I want to remove the  
> wiki mark-ups from the page and index only plain textual data. Please let  
> me know how this can be done.





> Thanks and regards,


> Pushker Chaubey









Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message