Skip to content

Conversation

@earshinov
Copy link
Contributor

Extends #282 and #460.

Demo (copied from extended testdata/demo_long.py):

<img src="../../docs/logo.png" alt="pdoc logo" width="150">

I am interested in this because there is no "official" way to specify image width and height in Markdown markup. markdown2 doesn't seem to recognize the ![pdoc logo](../../docs/logo.png =150x) syntax supported by some other Markdown implementations.

@earshinov
Copy link
Contributor Author

Also, not sure why autofix.ci introduced so many changes on top of my commit

Copy link
Member

@mhils mhils left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! This looks good. Please 1) rebase onto main and 2) add a CHANGELOG entry.

The autofix.ci changes were because you updated uv.lock, which updated our dependencies, which updated the HTML generated by pdoc for snapshot tests. I've done the same in #788, so this PR should be clean now.

@earshinov earshinov force-pushed the embed-local-images-in-html-img branch from 62d42ad to 776d932 Compare March 18, 2025 11:09
@earshinov
Copy link
Contributor Author

Thanks for the PR! This looks good. Please 1) rebase onto main and 2) add a CHANGELOG entry.

Done

Copy link
Member

@mhils mhils left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please keep the whitespace changes in CHANGELOG.md at bay? I don't mind the occasional fly-by change, but (some) whitespace in Markdown has semantic meaning.

@earshinov earshinov force-pushed the embed-local-images-in-html-img branch from 776d932 to a4dba5c Compare March 18, 2025 14:01
@earshinov
Copy link
Contributor Author

Can you please keep the whitespace changes in CHANGELOG.md at bay? I don't mind the occasional fly-by change, but (some) whitespace in Markdown has semantic meaning.

Sorry, fixed now.

By the way, have you considered using explicit <br>'s instead of trailing whitespace to force line breaks? This way people won't break the layout inadvertently. I know I'm not the first one 🙂

@mhils mhils force-pushed the embed-local-images-in-html-img branch from a4dba5c to 3c6e92e Compare March 18, 2025 15:35
@mhils mhils merged commit ac6f24a into mitmproxy:main Mar 18, 2025
14 checks passed
@mhils
Copy link
Member

mhils commented Mar 18, 2025

By the way, have you considered using explicit <br>'s instead of trailing whitespace to force line breaks? This way people won't break the layout inadvertently. I know I'm not the first one 🙂

Subjective preference for Markdown over HTML. I don't feel super strongly, but it's a Markdown document so using Markdown syntax is fine IMO. :)

Thanks again for the PR!

@earshinov earshinov deleted the embed-local-images-in-html-img branch March 18, 2025 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants