mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
fix: Overly greedy background -> highlight (#11500)
This commit is contained in:
@@ -77,8 +77,12 @@ export default class Highlight extends Mark {
|
||||
},
|
||||
},
|
||||
{
|
||||
style: "background-color",
|
||||
getAttrs: (style: string) => {
|
||||
tag: "span[style]",
|
||||
getAttrs: (dom) => {
|
||||
const style = dom.style.backgroundColor;
|
||||
if (!style) {
|
||||
return false;
|
||||
}
|
||||
const matchedColor = Highlight.findMatchingPresetColor(style);
|
||||
// Only apply highlight if we found a matching preset color
|
||||
// or if the color is clearly a highlight (not white/transparent)
|
||||
|
||||
Reference in New Issue
Block a user