rafmacalaba commited on
Commit
58e23bb
·
1 Parent(s): e02c275

fix: extend highlighting to headings, strong, em, blockquote

Browse files

UNHCR docs use #### prefixes extensively, rendering text as h4 elements
which were not in highlightComponents. Dataset mentions inside headings
or bold text were invisible.

app/components/MarkdownAnnotator.js CHANGED
@@ -129,6 +129,15 @@ export default function MarkdownAnnotator({ selectedDocIndex, selectedPage, curr
129
  li: highlightWrapper('li'),
130
  td: highlightWrapper('td'),
131
  th: highlightWrapper('th'),
 
 
 
 
 
 
 
 
 
132
  };
133
 
134
  return (
 
129
  li: highlightWrapper('li'),
130
  td: highlightWrapper('td'),
131
  th: highlightWrapper('th'),
132
+ h1: highlightWrapper('h1'),
133
+ h2: highlightWrapper('h2'),
134
+ h3: highlightWrapper('h3'),
135
+ h4: highlightWrapper('h4'),
136
+ h5: highlightWrapper('h5'),
137
+ h6: highlightWrapper('h6'),
138
+ blockquote: highlightWrapper('blockquote'),
139
+ strong: highlightWrapper('strong'),
140
+ em: highlightWrapper('em'),
141
  };
142
 
143
  return (