diff MoinMoin/wikiutil.py @ 2576:f4c371b00fec

refactor the ID generation/writing code
author Johannes Berg <johannes AT sipsolutions DOT net>
date Fri, 27 Jul 2007 11:37:37 +0200
parents a7dc3cc36362
children 2e6227a50d27
line wrap: on
line diff
--- a/MoinMoin/wikiutil.py	Fri Jul 27 11:37:15 2007 +0200
+++ b/MoinMoin/wikiutil.py	Fri Jul 27 11:37:37 2007 +0200
@@ -2100,6 +2100,10 @@
     return lines
 
 def anchor_name_from_text(text):
+    '''
+    Generate an anchor name from the given text
+    This function generates valid HTML IDs.
+    '''
     quoted = urllib.quote_plus(text.encode('utf-7'))
     res = quoted.replace('%', '.').replace('+', '').replace('_', '')
     if not res[:1].isalpha():