33
33
# pandoc automatically makes labels for headings.
34
34
label = m.group(1).lower()
35
35
label = re.sub(r'[^\w-]+', '', label) # Strip HTML entities
36
37
return RawInline('tex', r'\hyperref[{label}]{{{text}}}'.format(label=label, text=text))
38
39
# Other elements will be returned unchanged.