Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed issue 114, AttributeError #115

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions mkdocs_with_pdf/drivers/web_driver.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from typing import Protocol


class WebDriver(Protocol):

def render(self, html: str) -> str:
"""
Receive an html page in string format and execute the javascript
returning the new rendered html
"""
...
2 changes: 1 addition & 1 deletion mkdocs_with_pdf/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def _render_js(self, soup):
body.append(script)
if len(self._mixed_script) > 0:
tag = soup.new_tag('script')
tag.text = self._mixed_script
tag.append(self._mixed_script)
body.append(tag)
for src in scripts:
body.append(soup.new_tag('script', src=f'file://{src}'))
Expand Down
Loading