mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:30:26 -06:00
FIX: lookbehind assertions aren't available in < iOS 16.4 (#26139)
This would generate an error and prevent the page from loading on "older" iOSes
This commit is contained in:
parent
c78019032d
commit
ee3ccc5b67
@ -443,7 +443,7 @@ function findToken(tokens, marker, level = 0) {
|
||||
return token?.children ? findToken(token.children, marker, level + 1) : token;
|
||||
}
|
||||
|
||||
const CODE_MARKERS_REGEX = / |```|~~~|(?<!`)`(?!`)|\[code\]/;
|
||||
const CODE_MARKERS_REGEX = / |```|~~~|[^`]`[^`]|\[code\]/;
|
||||
const CODE_TOKEN_TYPES = ["code_inline", "code_block", "fence"];
|
||||
|
||||
export async function inCodeBlock(text, pos) {
|
||||
|
Loading…
Reference in New Issue
Block a user