Skip to content

Commit

Permalink
fix: remove error for ":" and "/" in anchor ids
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoterryy committed Feb 8, 2019
1 parent 7153f30 commit d2d4035
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions mkdocs_pdf_export_plugin/preprocessor/links.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ def transform_href(href: str, rel_url: str):

# normalize id to foo/bar/section:id
def transform_id(id: str, rel_url: str):
if ':' in id or '/' in id:
print('":" and "/" characters are banned! /:')
raise RuntimeError('Invalid ID found in {}, ID: {}'.format(rel_url, id))

head, tail = os.path.split(rel_url)
section, _ = os.path.splitext(tail)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setup(
name='mkdocs-pdf-export-plugin',
version='0.5.2b1',
version='0.5.2',
description='An MkDocs plugin to export content pages as PDF files',
long_description='The pdf-export plugin will export all markdown pages in your MkDocs repository as PDF files'
'using WeasyPrint. The exported documents support many advanced features missing in most other'
Expand Down

0 comments on commit d2d4035

Please sign in to comment.