-custom_css = '<link rel="stylesheet" href="pycco_custom.css">'
-patched_html = html_src.replace(css_marker, css_marker+custom_css, 1)
+custom_css = '<link rel="stylesheet" href="pycco_custom.css"><meta name="viewport" content="width=device-width">'
+assert html_src.count(css_marker) == 1
+html_src = html_src.replace(css_marker, css_marker+custom_css, 1)