Support dark/light theme images in markdown#36922
Conversation
|
The |
|
@bircni I updated my code for you comments. |
|
@wxiaoguang can you check my for this issue please? |
|
|
One of the feasible approaches is "calling |
|
By the way, this PR is unnecessarily complex. You can simply allow the I don't understand why you need to do these: extract the "picture" node / parse the attributes / transform to other layouts. |
|
@wxiaoguang My approach works like this: The |
|
I think we shouldn't touch The only thing need to do is to support |
93bd290 to
5217897
Compare
5217897 to
1b5c9f6
Compare
|
@wxiaoguang thank you for the quick update. |
|
I think it can be like this e1156fe |
|
@wxiaoguang I'd appreciate it if you can give me the ETA for the merge please. |
|
Wait for 2 maintainer's approvals. By the way, please update the PR's description |
|
I think the title can be "Make images support dark/light theme in markdown" |
|
Changed |
* giteaofficial/main: Add user badges (go-gitea#36752) Apply as maintainer (go-gitea#36947) Refactor storage content-type handling of ServeDirectURL (go-gitea#36804) Add summary to action runs view (go-gitea#36883) feat: Add configurable permissions for Actions automatic tokens (go-gitea#36173) Feature: Add button to re-run failed jobs in Actions (go-gitea#36924) Support dark/light theme images in markdown (go-gitea#36922) fix go-gitea#36463: preserve sort order of exclusive labels from template repo (go-gitea#36931) fix(upgrade.sh): use HTTPS for GPG key import and restore SELinux context after upgrade (go-gitea#36930) [skip ci] Updated translations via Crowdin Make container registry support Apple Container (basic auth) (go-gitea#36920) Fix various trivial problems (go-gitea#36921)
* origin/main: Update to eslint 10 (go-gitea#36925) Add user badges (go-gitea#36752) Apply as maintainer (go-gitea#36947) Refactor storage content-type handling of ServeDirectURL (go-gitea#36804) Add summary to action runs view (go-gitea#36883) feat: Add configurable permissions for Actions automatic tokens (go-gitea#36173) Feature: Add button to re-run failed jobs in Actions (go-gitea#36924) Support dark/light theme images in markdown (go-gitea#36922) fix go-gitea#36463: preserve sort order of exclusive labels from template repo (go-gitea#36931) fix(upgrade.sh): use HTTPS for GPG key import and restore SELinux context after upgrade (go-gitea#36930) [skip ci] Updated translations via Crowdin Make container registry support Apple Container (basic auth) (go-gitea#36920) Fix various trivial problems (go-gitea#36921) [skip ci] Updated translations via Crowdin # Conflicts: # package.json # pnpm-lock.yaml
This PR matches GitHub's behavior more closely on how to render Markdown images in light/dark mode.
Images with source suffix
#gh-dark-mode-only/#gh-light-mode-onlywill only show when the correct theme is requested.Closes: #35545