From 2b7587c617f128b9646878241eb8ebd129368774 Mon Sep 17 00:00:00 2001 From: John McLear Date: Fri, 8 May 2026 13:01:46 +0100 Subject: [PATCH] rename: ep_syntax_highlighting -> ep_hljs npm rejected publishing 'ep_syntax_highlighting' as too similar to 'ep_syntaxhighlighting' (without underscore between 'syntax' and 'highlighting'), an unmaintained 2014-era plugin by etinquis we don't own. Renaming to ep_hljs avoids the similarity check, ties the package name to the underlying library (highlight.js), and is shorter to type. Find/replace touches everything under the namespace: - package.json name - ep.json hook paths - require('ep_syntax_highlighting/...') -> require('ep_hljs/...') - padToggle / padSelect pluginName config - HTML element ids (#ep_syntax_highlighting_select etc.) - locale keys (ep_syntax_highlighting.label etc.) - references in templates, README, CLAUDE.md, scripts The Etherpad-side install path also moves: the plugin lives at plugin_packages/.versions/ep_hljs@/ now. 39 backend tests still pass under the new install path. GitHub repo also renamed: ether/ep_syntax_highlighting -> ether/ep_hljs. The old URL redirects, but the canonical home is now https://github.com/ether/ep_hljs. --- CLAUDE.md | 18 +++++------ README.md | 8 ++--- ep.json | 30 +++++++++---------- index.js | 16 +++++----- locales/en.json | 16 +++++----- package.json | 8 ++--- scripts/build-vendor.js | 4 +-- static/css/editor.css | 2 +- static/js/domOverlay.js | 8 ++--- static/js/index.js | 26 ++++++++-------- static/js/themeBridge.js | 2 +- .../specs/caret-stability.spec.ts | 6 ++-- .../frontend-new/specs/code-indent.spec.ts | 6 ++-- .../frontend-new/specs/collaboration.spec.ts | 6 ++-- .../frontend-new/specs/dark-mode.spec.ts | 4 +-- .../tests/frontend-new/specs/export.spec.ts | 4 +-- .../frontend-new/specs/initial-paint.spec.ts | 4 +-- .../specs/language-picker.spec.ts | 10 +++---- .../frontend-new/specs/large-pad.spec.ts | 4 +-- .../frontend-new/specs/lifecycle.spec.ts | 4 +-- .../specs/multi-user-caret.spec.ts | 6 ++-- .../specs/single-line-while.spec.ts | 6 ++-- templates/editbarButtons.ejs | 10 +++---- 23 files changed, 104 insertions(+), 104 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 3f4f45b..2f45328 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,4 +1,4 @@ -# Claude Code Guidelines for `ep_syntax_highlighting` +# Claude Code Guidelines for `ep_hljs` Whole-pad syntax highlighting for Etherpad, powered by highlight.js, painted via the **CSS Custom Highlights API**. This file is the architectural reference for anyone (Claude or human) extending the plugin. @@ -88,7 +88,7 @@ Each client runs `hljs.highlightAuto(padText)` on a 2s idle interval. Convergenc ## Settings (server-side) ```json -"ep_syntax_highlighting": { +"ep_hljs": { "indentSize": 2 } ``` @@ -101,11 +101,11 @@ All user-facing strings have `data-l10n-id` and a fallback English string. Keys | Key | Where | |---|---| -| `ep_syntax_highlighting.label` | toolbar dropdown aria-label | -| `ep_syntax_highlighting.auto` | dropdown "Auto-detect" option | -| `ep_syntax_highlighting.off` | dropdown "Off" option | -| `ep_syntax_highlighting.paused` | "Highlighting paused" badge | -| `ep_syntax_highlighting.user_enable` | padToggle checkbox label | +| `ep_hljs.label` | toolbar dropdown aria-label | +| `ep_hljs.auto` | dropdown "Auto-detect" option | +| `ep_hljs.off` | dropdown "Off" option | +| `ep_hljs.paused` | "Highlighting paused" badge | +| `ep_hljs.user_enable` | padToggle checkbox label | Programming language names (`JavaScript`, `Python`, etc.) are intentionally **not** translated — they're proper nouns / fixed identifiers in the hljs grammar registry. @@ -122,11 +122,11 @@ Programming language names (`JavaScript`, `Python`, etc.) are intentionally **no ```bash # Backend (jsdom + mocha) cd etherpad-lite/src && npx cross-env NODE_ENV=production mocha --import=tsx --timeout 30000 \ - $(find plugin_packages -path '*ep_syntax_highlighting*/static/tests/backend/specs/*.test.js' | tr '\n' ' ') + $(find plugin_packages -path '*ep_hljs*/static/tests/backend/specs/*.test.js' | tr '\n' ' ') # Frontend (Playwright) cd etherpad-lite/src && CI=true pnpm exec playwright test --project=chromium --reporter=line --workers=1 --retries=0 \ - $(find plugin_packages -path '*ep_syntax_highlighting*/static/tests/frontend-new/specs/*.spec.ts' | tr '\n' ' ') + $(find plugin_packages -path '*ep_hljs*/static/tests/frontend-new/specs/*.spec.ts' | tr '\n' ' ') ``` Backend (38 cases): `lruCache`, `highlightRegistry` (jsdom Range building), `codeIndent` (Enter/Tab/Shift+Tab logic with mocked rep+editorInfo), `hljsAdapter` (parseHljsHtml multi-class + entities), `padLanguageStore`, `socket`, `export`. diff --git a/README.md b/README.md index bfceef0..05b4052 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ep_syntax_highlighting +# ep_hljs Whole-pad syntax highlighting for Etherpad, powered by [highlight.js](https://highlightjs.org/). Closes [ether/etherpad#6616](https://github.com/ether/etherpad/issues/6616). @@ -26,7 +26,7 @@ Highlight.js detection runs on a 2-second idle timer; the LRU-cached `hljs.highl ## Install ```bash -pnpm run plugins i ep_syntax_highlighting +pnpm run plugins i ep_hljs ``` ## Configure @@ -34,7 +34,7 @@ pnpm run plugins i ep_syntax_highlighting Optional admin overrides in `settings.json`: ```json -"ep_syntax_highlighting": { +"ep_hljs": { "indent-size": 4 } ``` @@ -53,4 +53,4 @@ On older browsers the editor still works — highlighting silently no-ops. ## Bugs / requests -[github.com/ether/ep_syntax_highlighting/issues](https://github.com/ether/ep_syntax_highlighting/issues) +[github.com/ether/ep_hljs/issues](https://github.com/ether/ep_hljs/issues) diff --git a/ep.json b/ep.json index 2ab276e..548ece6 100644 --- a/ep.json +++ b/ep.json @@ -3,23 +3,23 @@ { "name": "main", "client_hooks": { - "postAceInit": "ep_syntax_highlighting/static/js/index", - "aceEditorCSS": "ep_syntax_highlighting/static/js/index", - "acePostWriteDomLineHTML": "ep_syntax_highlighting/static/js/index", - "aceKeyEvent": "ep_syntax_highlighting/static/js/index", - "handleClientMessage_CLIENT_MESSAGE": "ep_syntax_highlighting/static/js/index" + "postAceInit": "ep_hljs/static/js/index", + "aceEditorCSS": "ep_hljs/static/js/index", + "acePostWriteDomLineHTML": "ep_hljs/static/js/index", + "aceKeyEvent": "ep_hljs/static/js/index", + "handleClientMessage_CLIENT_MESSAGE": "ep_hljs/static/js/index" }, "hooks": { - "loadSettings": "ep_syntax_highlighting/index", - "padRemove": "ep_syntax_highlighting/index", - "padCopy": "ep_syntax_highlighting/index", - "clientVars": "ep_syntax_highlighting/index", - "socketio": "ep_syntax_highlighting/index", - "eejsBlock_editbarMenuLeft": "ep_syntax_highlighting/index", - "eejsBlock_mySettings": "ep_syntax_highlighting/index", - "eejsBlock_padSettings": "ep_syntax_highlighting/index", - "getLineHTMLForExport": "ep_syntax_highlighting/index", - "stylesForExport": "ep_syntax_highlighting/index" + "loadSettings": "ep_hljs/index", + "padRemove": "ep_hljs/index", + "padCopy": "ep_hljs/index", + "clientVars": "ep_hljs/index", + "socketio": "ep_hljs/index", + "eejsBlock_editbarMenuLeft": "ep_hljs/index", + "eejsBlock_mySettings": "ep_hljs/index", + "eejsBlock_padSettings": "ep_hljs/index", + "getLineHTMLForExport": "ep_hljs/index", + "stylesForExport": "ep_hljs/index" } } ] diff --git a/index.js b/index.js index de8fabc..9aa3118 100644 --- a/index.js +++ b/index.js @@ -10,22 +10,22 @@ const {padSelect} = require('ep_plugin_helpers/pad-select-server'); // "Highlight syntax in pads" toggle. Helper owns checkbox rendering, cookie // persistence, broadcast/sync, enforceSettings, and i18n wiring. const highlightToggle = padToggle({ - pluginName: 'ep_syntax_highlighting', + pluginName: 'ep_hljs', settingId: 'syntax-highlighting', - l10nId: 'ep_syntax_highlighting.user_enable', + l10nId: 'ep_hljs.user_enable', defaultLabel: 'Highlight syntax in pads', defaultEnabled: true, }); // Indent size dropdown (2 vs 4 spaces) for code-mode indenting. const indentSelect = padSelect({ - pluginName: 'ep_syntax_highlighting', + pluginName: 'ep_hljs', settingId: 'indent-size', - l10nId: 'ep_syntax_highlighting.indent_size', + l10nId: 'ep_hljs.indent_size', defaultLabel: 'Indent size', options: [ - {value: 2, label: '2 spaces', l10nId: 'ep_syntax_highlighting.indent_2'}, - {value: 4, label: '4 spaces', l10nId: 'ep_syntax_highlighting.indent_4'}, + {value: 2, label: '2 spaces', l10nId: 'ep_hljs.indent_2'}, + {value: 4, label: '4 spaces', l10nId: 'ep_hljs.indent_4'}, ], defaultValue: 2, }); @@ -74,7 +74,7 @@ exports.clientVars = async (hook, context) => { ...((toggleVars && toggleVars.ep_plugin_helpers) || {}), ...((indentVars && indentVars.ep_plugin_helpers) || {}), }, - ep_syntax_highlighting: value, + ep_hljs: value, }; }; @@ -97,7 +97,7 @@ exports.socketio = (hookName, {io}) => { }; exports.eejsBlock_editbarMenuLeft = (hookName, args, cb) => { - args.content += eejs.require('ep_syntax_highlighting/templates/editbarButtons.ejs', {}, module); + args.content += eejs.require('ep_hljs/templates/editbarButtons.ejs', {}, module); cb(); }; diff --git a/locales/en.json b/locales/en.json index 4c1a540..2651f1b 100644 --- a/locales/en.json +++ b/locales/en.json @@ -1,10 +1,10 @@ { - "ep_syntax_highlighting.label": "Syntax language", - "ep_syntax_highlighting.auto": "Auto-detect", - "ep_syntax_highlighting.off": "Off (no highlighting)", - "ep_syntax_highlighting.paused": "Highlighting paused (pad too large)", - "ep_syntax_highlighting.user_enable": "Highlight syntax in pads", - "ep_syntax_highlighting.indent_size": "Indent size", - "ep_syntax_highlighting.indent_2": "2 spaces", - "ep_syntax_highlighting.indent_4": "4 spaces" + "ep_hljs.label": "Syntax language", + "ep_hljs.auto": "Auto-detect", + "ep_hljs.off": "Off (no highlighting)", + "ep_hljs.paused": "Highlighting paused (pad too large)", + "ep_hljs.user_enable": "Highlight syntax in pads", + "ep_hljs.indent_size": "Indent size", + "ep_hljs.indent_2": "2 spaces", + "ep_hljs.indent_4": "4 spaces" } diff --git a/package.json b/package.json index c05b0e0..856805d 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "ep_syntax_highlighting", + "name": "ep_hljs", "version": "0.1.1", "description": "Whole-pad syntax highlighting for Etherpad via highlight.js. Auto-detect or pick a language; tokens are painted via the CSS Custom Highlights API — no DOM mutation, no caret drift.", "license": "Apache-2.0", @@ -7,13 +7,13 @@ "name": "John McLear", "email": "john@mclear.co.uk" }, - "homepage": "https://github.com/ether/ep_syntax_highlighting#readme", + "homepage": "https://github.com/ether/ep_hljs#readme", "bugs": { - "url": "https://github.com/ether/ep_syntax_highlighting/issues" + "url": "https://github.com/ether/ep_hljs/issues" }, "repository": { "type": "git", - "url": "https://github.com/ether/ep_syntax_highlighting.git" + "url": "https://github.com/ether/ep_hljs.git" }, "engines": { "node": ">=18.0.0" diff --git a/scripts/build-vendor.js b/scripts/build-vendor.js index 833e7fd..c4b8211 100644 --- a/scripts/build-vendor.js +++ b/scripts/build-vendor.js @@ -15,7 +15,7 @@ for (const name of ['github.css', 'github-dark.css']) { if (fs.existsSync(srcPath)) { fs.copyFileSync(srcPath, dstPath); } else if (!fs.existsSync(dstPath)) { - throw new Error(`[ep_syntax_highlighting] theme ${name} missing and no committed copy`); + throw new Error(`[ep_hljs] theme ${name} missing and no committed copy`); } } @@ -27,7 +27,7 @@ const run = () => { esbuild = require('esbuild'); } catch { if (!fs.existsSync(vendorOut)) { - throw new Error('[ep_syntax_highlighting] vendor JS missing and esbuild unavailable'); + throw new Error('[ep_hljs] vendor JS missing and esbuild unavailable'); } return; } diff --git a/static/css/editor.css b/static/css/editor.css index 995b976..acc5299 100644 --- a/static/css/editor.css +++ b/static/css/editor.css @@ -49,7 +49,7 @@ background-color: transparent !important; } -#ep_syntax_highlighting_paused_badge { +#ep_hljs_paused_badge { margin-left: 6px; font-style: italic; opacity: 0.7; diff --git a/static/js/domOverlay.js b/static/js/domOverlay.js index b1c23c4..c1c9961 100644 --- a/static/js/domOverlay.js +++ b/static/js/domOverlay.js @@ -1,13 +1,13 @@ 'use strict'; exports.showPausedBadge = (visible) => { - const sel = document.getElementById('ep_syntax_highlighting_select'); + const sel = document.getElementById('ep_hljs_select'); if (!sel) return; - let badge = document.getElementById('ep_syntax_highlighting_paused_badge'); + let badge = document.getElementById('ep_hljs_paused_badge'); if (visible && !badge) { badge = document.createElement('span'); - badge.id = 'ep_syntax_highlighting_paused_badge'; - badge.setAttribute('data-l10n-id', 'ep_syntax_highlighting.paused'); + badge.id = 'ep_hljs_paused_badge'; + badge.setAttribute('data-l10n-id', 'ep_hljs.paused'); badge.textContent = 'Highlighting paused'; sel.insertAdjacentElement('afterend', badge); } else if (!visible && badge) { diff --git a/static/js/index.js b/static/js/index.js index 10e10a0..16b190e 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -1,8 +1,8 @@ 'use strict'; -const syntaxRenderer = require('ep_syntax_highlighting/static/js/syntaxRenderer'); -const codeIndent = require('ep_syntax_highlighting/static/js/codeIndent'); -const themeBridge = require('ep_syntax_highlighting/static/js/themeBridge'); +const syntaxRenderer = require('ep_hljs/static/js/syntaxRenderer'); +const codeIndent = require('ep_hljs/static/js/codeIndent'); +const themeBridge = require('ep_hljs/static/js/themeBridge'); const socketio = require('ep_etherpad-lite/static/js/socketio'); // Sub-path import keeps the client bundle clean. const {padToggle} = require('ep_plugin_helpers/pad-toggle'); @@ -12,17 +12,17 @@ let socket = null; let currentPadId = null; const highlightToggle = padToggle({ - pluginName: 'ep_syntax_highlighting', + pluginName: 'ep_hljs', settingId: 'syntax-highlighting', - l10nId: 'ep_syntax_highlighting.user_enable', + l10nId: 'ep_hljs.user_enable', defaultLabel: 'Highlight syntax in pads', defaultEnabled: true, }); const indentSelect = padSelect({ - pluginName: 'ep_syntax_highlighting', + pluginName: 'ep_hljs', settingId: 'indent-size', - l10nId: 'ep_syntax_highlighting.indent_size', + l10nId: 'ep_hljs.indent_size', defaultLabel: 'Indent size', options: [ {value: 2, label: '2 spaces'}, @@ -42,7 +42,7 @@ const loadHljs = () => { if (typeof window !== 'undefined' && window.hljs) return Promise.resolve(); return new Promise((resolve) => { const script = document.createElement('script'); - script.src = '/static/plugins/ep_syntax_highlighting/static/js/vendor/hljs.min.js'; + script.src = '/static/plugins/ep_hljs/static/js/vendor/hljs.min.js'; script.onload = resolve; script.onerror = resolve; document.head.appendChild(script); @@ -50,7 +50,7 @@ const loadHljs = () => { }; const onLanguageChanged = (msg) => { - const sel = document.getElementById('ep_syntax_highlighting_select'); + const sel = document.getElementById('ep_hljs_select'); if (sel) { const newVal = msg.autoDetect ? 'auto' : msg.language; sel.value = newVal; @@ -63,7 +63,7 @@ const onLanguageChanged = (msg) => { exports.postAceInit = async (hookName, context) => { await loadHljs(); currentPadId = context.pad.getPadId(); - const initial = (typeof clientVars !== 'undefined' && clientVars.ep_syntax_highlighting) || + const initial = (typeof clientVars !== 'undefined' && clientVars.ep_hljs) || {language: 'auto', autoDetect: true}; const pad = require('ep_etherpad-lite/static/js/pad'); @@ -71,11 +71,11 @@ exports.postAceInit = async (hookName, context) => { socket.on('connect', () => socket.emit('joinPad', {padId: currentPadId})); socket.on('languageChanged', onLanguageChanged); socket.on('languageChangeRejected', (reason) => { - console.warn('[ep_syntax_highlighting] language change rejected:', reason && reason.error); + console.warn('[ep_hljs] language change rejected:', reason && reason.error); }); // Reflect initial language in the dropdown without dispatching a change event. - const sel = document.getElementById('ep_syntax_highlighting_select'); + const sel = document.getElementById('ep_hljs_select'); if (sel) { sel.value = initial.autoDetect ? 'auto' : initial.language; const $ = window.$; @@ -120,5 +120,5 @@ exports.acePostWriteDomLineHTML = syntaxRenderer.acePostWriteDomLineHTML; exports.aceKeyEvent = codeIndent.handleKey; exports.aceEditorCSS = () => [ - 'ep_syntax_highlighting/static/css/editor.css', + 'ep_hljs/static/css/editor.css', ]; diff --git a/static/js/themeBridge.js b/static/js/themeBridge.js index 280baa9..a676126 100644 --- a/static/js/themeBridge.js +++ b/static/js/themeBridge.js @@ -2,7 +2,7 @@ const LIGHT_FILE = 'github.css'; const DARK_FILE = 'github-dark.css'; -const PATH_MARKER = '/static/plugins/ep_syntax_highlighting/static/css/themes/'; +const PATH_MARKER = '/static/plugins/ep_hljs/static/css/themes/'; let listenersAttached = false; diff --git a/static/tests/frontend-new/specs/caret-stability.spec.ts b/static/tests/frontend-new/specs/caret-stability.spec.ts index dd65fdd..7ef27d2 100644 --- a/static/tests/frontend-new/specs/caret-stability.spec.ts +++ b/static/tests/frontend-new/specs/caret-stability.spec.ts @@ -89,12 +89,12 @@ test('language change clears stale token colors on inactive lines', async ({page // Change language to a JSON parser, which will produce no tokens for // either line (illegal JSON). The colibris skin wraps the . */ async function pickLanguage(page: import('@playwright/test').Page, value: string) { // The colibris skin replaces carries the aria-label; verify it is present. - const sel = page.locator('#ep_syntax_highlighting_select'); + const sel = page.locator('#ep_hljs_select'); await expect(sel).toHaveAttribute('aria-label', 'Syntax language'); // The nice-select renders the "auto" option as "Auto-detect". - await expect(page.locator('#ep_syntax_highlighting_li .nice-select .option[data-value="auto"]')) + await expect(page.locator('#ep_hljs_li .nice-select .option[data-value="auto"]')) .toHaveText('Auto-detect'); await pickLanguage(page, 'python'); diff --git a/static/tests/frontend-new/specs/large-pad.spec.ts b/static/tests/frontend-new/specs/large-pad.spec.ts index 2279633..2f67c4b 100644 --- a/static/tests/frontend-new/specs/large-pad.spec.ts +++ b/static/tests/frontend-new/specs/large-pad.spec.ts @@ -8,9 +8,9 @@ test('5000-line JS pad still highlights and stays responsive', async ({page, con await goToNewPad(page); // Select JavaScript explicitly so all lines are highlighted as JS. - const niceWrapper = page.locator('#ep_syntax_highlighting_li .nice-select'); + const niceWrapper = page.locator('#ep_hljs_li .nice-select'); await niceWrapper.click(); - await page.locator('#ep_syntax_highlighting_li .nice-select .option[data-value="javascript"]').click(); + await page.locator('#ep_hljs_li .nice-select .option[data-value="javascript"]').click(); const inner = page.frameLocator('iframe[name="ace_outer"]').frameLocator('iframe[name="ace_inner"]'); // Clear existing boilerplate content. diff --git a/static/tests/frontend-new/specs/lifecycle.spec.ts b/static/tests/frontend-new/specs/lifecycle.spec.ts index 7e6859d..627d8da 100644 --- a/static/tests/frontend-new/specs/lifecycle.spec.ts +++ b/static/tests/frontend-new/specs/lifecycle.spec.ts @@ -9,9 +9,9 @@ test('highlights a JS keyword after debounce', async ({page}) => { // Select JavaScript explicitly so auto-detect doesn't mis-classify the // pad's default "Welcome to Etherpad!" boilerplate. - const niceWrapper = page.locator('#ep_syntax_highlighting_li .nice-select'); + const niceWrapper = page.locator('#ep_hljs_li .nice-select'); await niceWrapper.click(); - await page.locator('#ep_syntax_highlighting_li .nice-select .option[data-value="javascript"]').click(); + await page.locator('#ep_hljs_li .nice-select .option[data-value="javascript"]').click(); const inner = page.frameLocator('iframe[name="ace_outer"]').frameLocator('iframe[name="ace_inner"]'); // Clear the welcome-text boilerplate so the only content is our JS snippet. diff --git a/static/tests/frontend-new/specs/multi-user-caret.spec.ts b/static/tests/frontend-new/specs/multi-user-caret.spec.ts index 93e29c5..e8522e1 100644 --- a/static/tests/frontend-new/specs/multi-user-caret.spec.ts +++ b/static/tests/frontend-new/specs/multi-user-caret.spec.ts @@ -17,12 +17,12 @@ const setupPad = async (page: Page) => { }; const pickLanguage = async (page: Page, value: string) => { - const niceWrapper = page.locator('#ep_syntax_highlighting_li .nice-select'); + const niceWrapper = page.locator('#ep_hljs_li .nice-select'); if (await niceWrapper.count() > 0) { await niceWrapper.click(); - await page.locator(`#ep_syntax_highlighting_li .nice-select .option[data-value="${value}"]`).click(); + await page.locator(`#ep_hljs_li .nice-select .option[data-value="${value}"]`).click(); } else { - await page.locator('#ep_syntax_highlighting_select').selectOption(value); + await page.locator('#ep_hljs_select').selectOption(value); } }; diff --git a/static/tests/frontend-new/specs/single-line-while.spec.ts b/static/tests/frontend-new/specs/single-line-while.spec.ts index 73e4b35..cf427b7 100644 --- a/static/tests/frontend-new/specs/single-line-while.spec.ts +++ b/static/tests/frontend-new/specs/single-line-while.spec.ts @@ -18,12 +18,12 @@ const setupPad = async (page: Page) => { }; const pickLanguage = async (page: Page, value: string) => { - const niceWrapper = page.locator('#ep_syntax_highlighting_li .nice-select'); + const niceWrapper = page.locator('#ep_hljs_li .nice-select'); if (await niceWrapper.count() > 0) { await niceWrapper.click(); - await page.locator(`#ep_syntax_highlighting_li .nice-select .option[data-value="${value}"]`).click(); + await page.locator(`#ep_hljs_li .nice-select .option[data-value="${value}"]`).click(); } else { - await page.locator('#ep_syntax_highlighting_select').selectOption(value); + await page.locator('#ep_hljs_select').selectOption(value); } }; diff --git a/templates/editbarButtons.ejs b/templates/editbarButtons.ejs index 86138ee..0f04a57 100644 --- a/templates/editbarButtons.ejs +++ b/templates/editbarButtons.ejs @@ -1,11 +1,11 @@
  • -
  • - - - + +