Skip to content

Commit 0a4a774

Browse files
committed
fix: build mention rules default flow
1 parent 82515f4 commit 0a4a774

2 files changed

Lines changed: 7 additions & 11 deletions

File tree

src/web/EnrichedText.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -275,14 +275,6 @@
275275
min-height: max(1lh, var(--et-checkbox-box-size, 24px));
276276
}
277277

278-
.et-view ul[data-type="checkbox"] > li > p {
279-
align-items: center;
280-
gap: 0;
281-
margin: 0;
282-
padding: 0;
283-
user-select: none;
284-
}
285-
286278
.et-view ul[data-type="checkbox"] > li > input[type='checkbox'] {
287279
position: absolute;
288280
left: calc(

src/web/styleConversion/htmlStyleToCSSVariables.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,19 @@ export function mergeWithDefaultEnrichedTextHtmlStyle(
6464
};
6565

6666
const mentionDefaults = DEFAULT_ENRICHED_TEXT_STYLE.mention;
67-
const mentionMap = htmlStyle?.mention as Record<
67+
const passedMentionMap = htmlStyle?.mention;
68+
const mergedMentionMap = merged.mention as Record<
6869
string,
6970
EnrichedTextMentionStyleProperties
7071
>;
7172
const mention: Record<string, EnrichedTextMentionStyleProperties> = {};
72-
for (const indicator in mentionMap) {
73+
for (const indicator in mergedMentionMap) {
7374
mention[indicator] = {
7475
...mentionDefaults,
75-
...mentionMap[indicator],
76+
...(isMentionStyleRecord(passedMentionMap)
77+
? (passedMentionMap[indicator] ??
78+
passedMentionMap[MENTION_STYLE_DEFAULT_KEY])
79+
: passedMentionMap),
7680
};
7781
}
7882

0 commit comments

Comments
 (0)