Commit 24ccf35c authored by Yusei Tahara's avatar Yusei Tahara

Renamed external method.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18207 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e4022fd9
......@@ -91,7 +91,7 @@ def generateParts(context,text,sw,tags,trail,maxlines):
yield par # return the last marked part
def cutFound(context, txt, sw, tags, trail, maxlines):
def getExcerptText(context, txt, sw, tags, trail, maxlines):
"""
Returns an excerpt of text found in the txt string
"""
......
......@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ExternalMethod.ExternalMethod</string>
<string>ExternalMethod</string>
</tuple>
<none/>
<global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -20,7 +17,7 @@
</item>
<item>
<key> <string>_function</string> </key>
<value> <string>cutFound</string> </value>
<value> <string>getExcerptText</string> </value>
</item>
<item>
<key> <string>_module</string> </key>
......@@ -28,7 +25,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>cutFound</string> </value>
<value> <string>Base_getExcerptText</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -115,11 +115,11 @@ if search_words in (\'\', None,):\n
return result\n
\n
# get fragments of text containing searched words\n
found_text_fragments = context.cutFound(context, \n
document_text, \n
search_words, \n
tags = (\'<div style="font-weight:bold;display:inline;">\', \'</div>\'), \n
trail = 5, \n
found_text_fragments = context.Base_getExcerptText(context,\n
document_text,\n
search_words,\n
tags = (\'<div style="font-weight:bold;display:inline;">\', \'</div>\'),\n
trail = 5,\n
maxlines = 5)\n
result = \' \'.join(map(str, found_text_fragments))\n
\n
......
751
\ No newline at end of file
752
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment