- Commit
- 456f3f30c42c492357883dfe71c7ca96a36696ea
- Parent
- 1f9fb63cb654b985e0d237444827078c8a621fdd
- Author
- John MacFarlane <jgm@berkeley.edu>
- Date
makespec.py: put ids on headers, not separate anchor.
My personal build of CMark ✏️
makespec.py: put ids on headers, not separate anchor.
1 file changed, 2 insertions, 0 deletions
Status | File Name | N° Changes | Insertions | Deletions |
Modified | makespec.py | 2 | 2 | 0 |
diff --git a/makespec.py b/makespec.py @@ -130,6 +130,8 @@ elif specformat == "html": [retcode, result, err] = pipe_through_prog(prog, toc + mdtext) if retcode == 0: result = re.sub(r'␣', '<span class="space"> </span>', result) + result = re.sub(r'<h([1-6])><a id="([^\"]*)"><\/a> ', + "<h\\1 id=\"\\2\">", result) sys.stdout.write(template.substitute(metadata, body=result)) # check for errors: