-
Notifications
You must be signed in to change notification settings - Fork 16
/
main.py
18 lines (16 loc) · 659 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import re
def define_env(env):
"Hook function"
@env.macro
def k8spxcjira(bugnumber):
return '[K8SPXC-'+str(bugnumber)+'](https://jira.percona.com/browse/K8SPXC-'+str(bugnumber)+')'
@env.macro
def cloudjira(bugnumber):
return '[CLOUD-'+str(bugnumber)+'](https://jira.percona.com/browse/CLOUD-'+str(bugnumber)+')'
@env.macro
def optionlink(optionname, optionprefix=''):
linkname=optionname.replace('.', '-').lower()
linkname=re.sub('<.*?>-', '', linkname)
if (optionprefix != ''):
optionprefix+='-'
return '<a name=\"'+optionprefix+linkname+'\"></a> ['+optionname+'](#'+optionprefix+linkname+')'