correction pb h3
This commit is contained in:
@@ -24,25 +24,22 @@ let baliseWords = [
|
||||
'breakafter'
|
||||
];
|
||||
|
||||
// Get the HTML content of the "body" element
|
||||
var bodyContent = $('#body').html();
|
||||
|
||||
// Replace text between brackets only if it matches one of the words in the list
|
||||
bodyContent = bodyContent.replace(/\[([^\/\]]+)\]/g, function(match, word) {
|
||||
if (baliseWords.includes(word)) {
|
||||
return '<div class="' + word + '">';
|
||||
} else {
|
||||
return match; // No replacement if the word is not in the list
|
||||
return match;
|
||||
}
|
||||
}).replace(/\[\/([^\]]+)\]/g, function(match, word) {
|
||||
if (baliseWords.includes(word)) {
|
||||
return '</div>';
|
||||
} else {
|
||||
return match; // No replacement if the word is not in the list
|
||||
return match;
|
||||
}
|
||||
});
|
||||
|
||||
// Update the content of the "body" element
|
||||
$('#body').empty().append(bodyContent);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user