LiYanan2004 / MarkdownView

Rendering Markdown text natively in SwiftUI.
https://liyanan2004.github.io/MarkdownView/documentation/markdownview/
MIT License
195 stars 18 forks source link

Update syntax highlighting when dark mode changes #32

Open aheze opened 4 months ago

aheze commented 4 months ago

Currently the code block syntax highlighting changes when CodeHighlighterTheme is changed. However, it doesn't update when system dark mode is toggled.

I added an .onChange(of: colorScheme) to handle this case.

LiYanan2004 commented 4 months ago

Could you please attach a comparison video on this? task(id:_) do exactly the same thing so I think onChange(of: colorScheme) is a duplication.