This commit is contained in:
Cyril G 2026-05-25 10:24:18 -04:00 committed by GitHub
commit fa4933b815
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -155,6 +155,16 @@ const applyOlMarkdown = ({selectionEnd, selectionStart, message}: ApplySpecificM
newEnd = Math.max(selectionEnd - (delimiterLength * count), 0);
} else {
let count = 0;
const getLastNumberedLine = (text: string): number => {
const match = text.match(/(\d+)\.\s/g);
if (match) {
return parseInt(match[match.length - 1], 10);
}
return 0;
};
getDelimiter.counter = getLastNumberedLine(newPrefix) + 1;
if (isFirstLineSelected) {
multilineSelection = getDelimiter() + multilineSelection;
count++;