chore: format
This commit is contained in:
@@ -357,9 +357,9 @@ export const generateInitialsImage = (name) => {
|
||||
const initials =
|
||||
sanitizedName.length > 0
|
||||
? sanitizedName[0] +
|
||||
(sanitizedName.split(' ').length > 1
|
||||
? sanitizedName[sanitizedName.lastIndexOf(' ') + 1]
|
||||
: '')
|
||||
(sanitizedName.split(' ').length > 1
|
||||
? sanitizedName[sanitizedName.lastIndexOf(' ') + 1]
|
||||
: '')
|
||||
: '';
|
||||
|
||||
ctx.fillText(initials.toUpperCase(), canvas.width / 2, canvas.height / 2);
|
||||
@@ -515,10 +515,10 @@ export const compareVersion = (latest, current) => {
|
||||
return current === '0.0.0'
|
||||
? false
|
||||
: current.localeCompare(latest, undefined, {
|
||||
numeric: true,
|
||||
sensitivity: 'case',
|
||||
caseFirst: 'upper'
|
||||
}) < 0;
|
||||
numeric: true,
|
||||
sensitivity: 'case',
|
||||
caseFirst: 'upper'
|
||||
}) < 0;
|
||||
};
|
||||
|
||||
export const extractCurlyBraceWords = (text) => {
|
||||
|
||||
@@ -31,7 +31,7 @@ export function citationExtension() {
|
||||
while ((m = groupRegex.exec(raw))) {
|
||||
// m[1] is the content inside brackets, e.g. "1, 2#foo"
|
||||
const parts = m[1].split(',').map((p) => p.trim());
|
||||
|
||||
|
||||
parts.forEach((part) => {
|
||||
// Check if it starts with digit
|
||||
const match = /^(\d+)(?:#(.+))?$/.exec(part);
|
||||
@@ -45,7 +45,7 @@ export function citationExtension() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if (ids.length === 0) return;
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user