Skip to content

Commit 6453781

Browse files
committed
Merge branch 'samuel-cavalcanti/master' (Pull Request orzih#115)
Signed-off-by: Masayuki Murata <[email protected]>
2 parents ccf20e5 + 3d86f57 commit 6453781

File tree

5 files changed

+6430
-1
lines changed

5 files changed

+6430
-1
lines changed

mkdocs_with_pdf/drivers/web_driver.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from typing import Protocol
2+
3+
4+
class WebDriver(Protocol):
5+
6+
def render(self, html: str) -> str:
7+
"""
8+
Receive an html page in string format and execute the javascript
9+
returning the new rendered html
10+
"""
11+
...

mkdocs_with_pdf/generator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ def _render_js(self, soup):
378378
body.append(script)
379379
if len(self._mixed_script) > 0:
380380
tag = soup.new_tag('script')
381-
tag.text = self._mixed_script
381+
tag.append(self._mixed_script)
382382
body.append(tag)
383383
for src in scripts:
384384
body.append(soup.new_tag('script', src=f'file://{src}'))

0 commit comments

Comments
 (0)