Build a cache key for theme-dependent terminal colors, not just the stable UI theme id.
(theme: AppTheme)
| 56 | |
| 57 | /** Build a cache key for theme-dependent terminal colors, not just the stable UI theme id. */ |
| 58 | function themeRenderCacheKey(theme: AppTheme) { |
| 59 | return [ |
| 60 | theme.id, |
| 61 | theme.syntaxTheme ?? "", |
| 62 | theme.appearance, |
| 63 | theme.background, |
| 64 | theme.panelAlt, |
| 65 | theme.contextBg, |
| 66 | theme.addedBg, |
| 67 | theme.removedBg, |
| 68 | theme.addedContentBg, |
| 69 | theme.removedContentBg, |
| 70 | theme.addedSignColor, |
| 71 | theme.removedSignColor, |
| 72 | theme.syntaxColors.default, |
| 73 | theme.syntaxColors.keyword, |
| 74 | theme.syntaxColors.string, |
| 75 | theme.syntaxColors.comment, |
| 76 | theme.syntaxColors.number, |
| 77 | theme.syntaxColors.function, |
| 78 | theme.syntaxColors.property, |
| 79 | theme.syntaxColors.type, |
| 80 | theme.syntaxColors.variable ?? "", |
| 81 | theme.syntaxColors.operator ?? "", |
| 82 | theme.syntaxColors.punctuation, |
| 83 | ].join(":"); |
| 84 | } |
| 85 | |
| 86 | type HastNode = HastTextNode | HastElementNode; |
| 87 |
no outgoing calls
no test coverage detected