mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-20 21:41:32 +01:00
Fix codeblock underscores with language
This commit is contained in:
parent
0fb528ac09
commit
de91b395b0
@ -8,7 +8,7 @@ export const markdownUnderscoreExt = () => {
|
||||
|
||||
return [{
|
||||
type: 'output',
|
||||
regex: new RegExp('(<code>[\\s\\S]*?<\\/code>)|\\b(?<!_)_(?!_)(.*?)(?<!_)_(?!_)\\b', 'g'),
|
||||
regex: new RegExp('(<code(?:\\s+[^>]*)?>[\\s\\S]*?<\\/code>)|\\b(?<!_)_(?!_)(.*?)(?<!_)_(?!_)\\b', 'g'),
|
||||
replace: function(match, codeContent, italicContent) {
|
||||
if (codeContent) {
|
||||
// If it's inside <code> tags, return unchanged
|
||||
|
Loading…
Reference in New Issue
Block a user