fix: update comments in latex utility and refactor variable declaration for clarity
Test / backend (push) Successful in 13s
Test / frontend (push) Failing after 16s

This commit is contained in:
LaurensBartelds committed 2026-04-26 21:53:37 +02:00
1 parent 739133e1f4
commit 98bba73192
2 files changed
+24 -11

No files matched your search

+22 -9
View File
@@ -1,14 +1,14 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
import { defineConfig, globalIgnores } from 'eslint/config'
import js from "@eslint/js";
import globals from "globals";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
import tseslint from "typescript-eslint";
import { defineConfig, globalIgnores } from "eslint/config";
export default defineConfig([
globalIgnores(['dist']),
globalIgnores(["dist"]),
{
files: ['**/*.{ts,tsx}'],
files: ["**/*.{ts,tsx}"],
extends: [
js.configs.recommended,
tseslint.configs.recommended,
@@ -19,5 +19,18 @@ export default defineConfig([
ecmaVersion: 2020,
globals: globals.browser,
},
rules: {
"react-hooks/rules-of-hooks": "warn",
"react-hooks/exhaustive-deps": "warn",
"react-hooks/set-state-in-effect": "warn",
"react-hooks/purity": "warn",
"react-refresh/only-export-components": "warn",
"no-control-regex": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{ argsIgnorePattern: "^_" },
],
"prefer-const": "warn",
},
},
])
]);
+2 -2
View File
@@ -47,9 +47,9 @@ export const highlightCode = (code: string, _lang: string): string => {
// Extract comments and strings into placeholders before applying keyword/number/fn regexes
// so later passes don't corrupt previously-injected span tag attributes.
// is a Unicode private-use-area char that never appears in source code.
// \uE000 is a Unicode private-use-area char that never appears in source code.
// Word chars around the index (e.g. _HL0_) prevent \b(\d+)\b from matching the index digits.
let result = escaped
const result = escaped
.replaceAll(/(\/\/[^\n]*|#[^\n]*)/g, (m) => {
const i = spans.length
spans.push(`<span class="cm-comment">${m}</span>`)