/usr/lib/python2.7/dist-packages/zzzeeksphinx/util.py is in python-zzzeeksphinx 1.0.20-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | import sphinx
import re
SPHINX_VERSION = tuple(
int(dig) for dig in re.findall("\d+", sphinx.__version__)
)
def striptags(text):
return re.compile(r'<[^>]*>').sub('', text)
def go(m):
# .html with no anchor if present, otherwise "#" for top of page
return m.group(1) or '#'
def strip_toplevel_anchors(text):
return re.compile(r'(\.html)?#[-\w]+-toplevel').sub(go, text)
|