mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-01 18:27:18 +00:00
adjust to changes in pdoc 12
This commit is contained in:
parent
f07a458a71
commit
49c7f09a94
3 changed files with 7 additions and 12 deletions
|
|
@ -20,7 +20,7 @@ pdoc.render.configure(
|
|||
edit_url_map=edit_url_map,
|
||||
)
|
||||
# We can't configure Hugo, but we can configure pdoc.
|
||||
pdoc.render_helpers.formatter.cssclass = "chroma"
|
||||
pdoc.render_helpers.formatter.cssclass = "chroma pdoc-code"
|
||||
|
||||
modules = [
|
||||
"mitmproxy.addonmanager",
|
||||
|
|
|
|||
|
|
@ -7,19 +7,13 @@ To document all event hooks, we do a bit of hackery:
|
|||
|
||||
#}
|
||||
{% if module.name == "events" %}
|
||||
{% macro module_name() %}
|
||||
{% endmacro %}
|
||||
{% macro module_name() %}{% endmacro %}
|
||||
{% macro class(cls) %}
|
||||
<div class="attr class">
|
||||
{{ headerlink(cls) }}
|
||||
<span class="name">{{ cls.qualname.replace("Events", " Events") }}</span>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
{% macro view_source(doc) %}
|
||||
{% if doc.type == "function" %}
|
||||
{{ default_view_source(doc) }}
|
||||
{% endif %}
|
||||
<span class="name">{{ cls.qualname.replace("Events", " Events").replace("AdvancedLifecycle", "Advanced Lifecycle") }}</span>
|
||||
{% endmacro %}
|
||||
{% macro view_source_state(doc) %}{% endmacro %}
|
||||
{% macro view_source_button(doc) %}{% endmacro %}
|
||||
{% macro view_source_code(doc) %}{% endmacro %}
|
||||
{% macro is_public(doc) %}
|
||||
{% if doc.name != "__init__" %}
|
||||
{{ default_is_public(doc) }}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* Line Numbers */ .chroma span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 20px; }
|
||||
/* Background */ .chroma { background-color: #ffffff }
|
||||
/* Other */ .chroma .x { }
|
||||
/* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue