Skip to content

Commit b6d5abe

Browse files
committed
[B] Change underlined annotation tag from span to mark
1 parent f780d3f commit b6d5abe

File tree

2 files changed

+12
-1
lines changed
  • client/src

2 files changed

+12
-1
lines changed

client/src/reader/components/section/body-nodes/nodes/Text.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,13 @@ class TextNode extends Component {
239239
...previousTabIndex
240240
};
241241

242-
const Tag = interactiveAttributes.href ? "a" : "span";
242+
let Tag = "span";
243+
244+
if (interactiveAttributes.href) {
245+
Tag = "a";
246+
} else if (textAnnotationIds?.length > 0) {
247+
Tag = "mark";
248+
}
243249

244250
return (
245251
// eslint-disable-next-line react/no-array-index-key

client/src/theme/styles/base/resets.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,4 +231,9 @@ export default `
231231
border-spacing: 0;
232232
border-collapse: collapse;
233233
}
234+
235+
/* Remove mark tag styles */
236+
mark {
237+
background-color: initial;
238+
}
234239
`;

0 commit comments

Comments
 (0)