[DEV] correction on the links
This commit is contained in:
parent
3ce578dac1
commit
7654eea321
@ -40,7 +40,7 @@ def transcode(value):
|
|||||||
r'<a href="tutorial_\1.html">\2</a>',
|
r'<a href="tutorial_\1.html">\2</a>',
|
||||||
value)
|
value)
|
||||||
|
|
||||||
value = re.sub(r'\[class\[(.*?)\]\]',
|
value = re.sub(r'\[(lib|class|methode)\[(.*?)\]\]',
|
||||||
replace_link_class,
|
replace_link_class,
|
||||||
value)
|
value)
|
||||||
|
|
||||||
@ -69,9 +69,16 @@ def replace_link_class(match):
|
|||||||
if match.group() == "":
|
if match.group() == "":
|
||||||
return ""
|
return ""
|
||||||
#debug.info("plop: " + str(match.group()))
|
#debug.info("plop: " + str(match.group()))
|
||||||
className = match.groups()[0]
|
if match.groups()[0] == 'class':
|
||||||
value = re.sub(':', '_', className)
|
className = match.groups()[1]
|
||||||
return '<a href="' + value + '.html">' + className + '</a>'
|
value = re.sub(':', '_', className)
|
||||||
|
return '<a href="class_' + value + '.html">' + className + '</a>'
|
||||||
|
elif match.groups()[0] == 'lib':
|
||||||
|
return match.groups()[1]
|
||||||
|
elif match.groups()[0] == 'methode':
|
||||||
|
return match.groups()[1]
|
||||||
|
else:
|
||||||
|
return match.groups()[1]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user