Skip to content

Commit 256581d

Browse files
authored
Merge pull request #1164 from rakesh2OO5/fix/issue-lt-gt
Fix inline <code> escaping in reference pages
2 parents 25384f0 + b005472 commit 256581d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/components/Dropdown/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ export const Dropdown = ({
152152
</div>
153153
<button
154154
onClick={() => handleOptionClick(option)}
155-
ref={el => {
156-
optionRefs.current[index] = el as HTMLButtonElement
155+
ref={(el) => {
156+
optionRefs.current[index] = el as HTMLButtonElement;
157157
}}
158158
onBlur={handleBlur}
159159
>

src/pages/_utils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,9 @@ export const getRefEntryTitleConcatWithParen = (
230230
*/
231231
export const escapeCodeTagsContent = (htmlString: string): string => {
232232
// Load the HTML string into Cheerio
233-
const $ = load(htmlString);
233+
const $ = load(htmlString, {
234+
xmlMode: true
235+
});
234236
// Loop through all <code> tags
235237
$("code").each(function () {
236238
// Don't escape code in multiline blocks, as these will already

0 commit comments

Comments
 (0)