You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by ro...@apache.org on 2024/09/06 09:43:53 UTC
(incubator-answer-plugins) 02/06: feat: codehighlight backend function
This is an automated email from the ASF dual-hosted git repository.
robin0716 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-answer-plugins.git
commit 630f47b46209cf8e75e81c1ebc7a4e305addc497
Author: IamMelody233 <zh...@ones.cn>
AuthorDate: Wed Sep 4 17:11:54 2024 +0800
feat: codehighlight backend function
---
render-markdown-codehighlight/README.md | 12 +-
render-markdown-codehighlight/desktop.ini | 3 +
render-markdown-codehighlight/generate-theme.cjs | 50 +-
render-markdown-codehighlight/hooks.ts | 19 +
render-markdown-codehighlight/i18n/en_US.yaml | 10 +-
render-markdown-codehighlight/i18n/translation.go | 1 -
render-markdown-codehighlight/i18n/zh_CN.yaml | 10 +-
render-markdown-codehighlight/package-lock.json | 709 ---------------------
...highlight.go => renderMarkdownCodehighlight.go} | 2 +-
render-markdown-codehighlight/themeColors.js | 217 -------
render-markdown-codehighlight/themeStyles.js | 230 -------
render-markdown-codehighlight/theme_list.go | 62 --
12 files changed, 93 insertions(+), 1232 deletions(-)
diff --git a/render-markdown-codehighlight/README.md b/render-markdown-codehighlight/README.md
index 2253c0e..a49dec4 100644
--- a/render-markdown-codehighlight/README.md
+++ b/render-markdown-codehighlight/README.md
@@ -1 +1,11 @@
-# RenderMarkdownCodehighlight Plugin
\ No newline at end of file
+# RenderMarkdownCodehighlight Plugin
+The `RenderMarkdownCodehighlight` plugin improves the readability of code snippets within Markdown content by integrating highlight.js for syntax highlighting. It supports dynamic theme switching, allowing code blocks to adapt seamlessly to either light or dark themes based on your application's current theme. This makes code blocks more visually appealing and easier to read.
+
+### Features
+Dynamic Theme Switching: Automatically switches between light and dark modes for code highlighting based on the selected theme.
+Theme Support: Supports various highlight.js themes, with some themes designed for both light and dark modes, while others are specifically tailored for one mode.
+
+### Theme Types
+theme-all: These themes support both light and dark modes, automatically adjusting based on the application's current theme.
+theme-light: These themes are optimized for light mode and will use default dark mode.
+theme-dark: These themes are designed specifically for dark mode and will use default light mode.
diff --git a/render-markdown-codehighlight/desktop.ini b/render-markdown-codehighlight/desktop.ini
new file mode 100644
index 0000000..6a73e82
--- /dev/null
+++ b/render-markdown-codehighlight/desktop.ini
@@ -0,0 +1,3 @@
+[LocalizedFileNames]
+???? 2024-08-16 124615.png=@???? 2024-08-16 124615,0
+???? 2024-08-16 124545.png=@???? 2024-08-16 124545,0
diff --git a/render-markdown-codehighlight/generate-theme.cjs b/render-markdown-codehighlight/generate-theme.cjs
index e803304..2b36e0b 100644
--- a/render-markdown-codehighlight/generate-theme.cjs
+++ b/render-markdown-codehighlight/generate-theme.cjs
@@ -1,10 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ * OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
const fs = require('fs');
const path = require('path');
-const stylesDir = path.resolve(__dirname, 'node_modules/highlight.js/styles');
-const jsOutputFile = path.resolve(__dirname, 'themeStyles.js');
-const goOutputFile = path.resolve(__dirname, 'theme_list.go');
-const colorInfoOutputFile = path.resolve(__dirname, 'themeColors.js');
+const stylesDir = path.resolve(__dirname, 'node_modules/highlight.js/styles'); // Path to Highlight.js styles directory
+const jsOutputFile = path.resolve(__dirname, 'themeStyles.js'); // Path to output JavaScript file
+const goOutputFile = path.resolve(__dirname, 'theme_list.go'); // Path to output Go file
+const colorInfoOutputFile = path.resolve(__dirname, 'themeColors.js'); // Path to output color information file
// Read all CSS files from the styles directory
let themes = fs.readdirSync(stylesDir).filter(file => file.endsWith('.css'));
@@ -28,13 +47,15 @@ const cssColorNames = {
black: '#000000',
white: '#ffffff',
navy: '#000080',
- // Add more color names as needed if the background color in css is not defined in standard method
+ // Add more color names as needed if the background color in css is not defined in a standard method
};
+// Convert color names (e.g., 'black', 'white') to hex values
function convertColorNameToHex(colorName) {
return cssColorNames[colorName.toLowerCase()] || null;
}
+// Normalize hex color code (e.g., convert shorthand hex to full length)
function normalizeHexColor(hexColor) {
hexColor = hexColor.startsWith('#') ? hexColor.slice(1) : hexColor;
if (hexColor.length === 3) {
@@ -43,6 +64,7 @@ function normalizeHexColor(hexColor) {
return hexColor;
}
+// Determine if a theme is dark based on its background color
function isDarkTheme(color) {
if (!color.startsWith('#') && !color.startsWith('rgb')) {
const hexColor = convertColorNameToHex(color);
@@ -57,10 +79,11 @@ function isDarkTheme(color) {
const r = (rgb >> 16) & 0xff;
const g = (rgb >> 8) & 0xff;
const b = (rgb >> 0) & 0xff;
- const brightness = (r * 299 + g * 587 + b * 114) / 1000;
- return brightness < 128;
+ const brightness = (r * 299 + g * 587 + b * 114) / 1000; // Calculate brightness based on RGB values
+ return brightness < 128; // Dark theme if brightness is below the threshold
}
+// Process each theme file
themes.forEach(file => {
const themeName = file.replace('.css', '').replace('.min', '');
const [base, ...variantParts] = themeName.split('-');
@@ -73,6 +96,7 @@ themes.forEach(file => {
let isDark = false;
let backgroundColor = null;
+ // Identify light or dark themes based on the variant name
if (variant.includes('light')) {
if (!themeMap[base].light || themeMap[base].light.length > file.length) {
themeMap[base].light = `() => import('highlight.js/styles/${file}?inline')`;
@@ -88,6 +112,7 @@ themes.forEach(file => {
}
}
} else {
+ // Extract background color from CSS content and determine if it's a dark theme
const cssContent = fs.readFileSync(path.resolve(stylesDir, file), 'utf-8');
const backgroundMatch = cssContent.match(/\.hljs\s*{[^}]*?\s*background(?:-color)?:\s*(#[0-9a-fA-F]{3,6}|rgb\([^)]+\)|[a-zA-Z]+|url\([^)]+\))/i);
backgroundColor = backgroundMatch ? backgroundMatch[1].trim() : null;
@@ -106,6 +131,7 @@ themes.forEach(file => {
}
}
+ // Assign the theme to light or dark based on the background color
if (isDark) {
if (!themeMap[base].dark || themeMap[base].dark.length > file.length) {
themeMap[base].dark = `() => import('highlight.js/styles/${file}?inline')`;
@@ -123,10 +149,12 @@ themes.forEach(file => {
}
}
+ // Add theme to the theme list
if (!themeList.includes(base)) {
themeList.push(base);
}
+ // Store theme color information
if (backgroundColor) {
themeColors.push({
theme: base,
@@ -136,6 +164,7 @@ themes.forEach(file => {
}
});
+// Classify themes based on the presence of light and dark variants
themeList = themeList.map(base => {
if (themeMap[base].light && !themeMap[base].dark) {
return `${base}-light`;
@@ -148,6 +177,7 @@ themeList = themeList.map(base => {
}
});
+// Assign default light and dark themes if missing
Object.keys(themeMap).forEach(base => {
if (!themeMap[base].dark && defaultDarkTheme) {
themeMap[base].dark = defaultDarkTheme;
@@ -157,13 +187,15 @@ Object.keys(themeMap).forEach(base => {
}
});
+// Generate the JavaScript output for theme styles
const jsOutput = `export const themeStyles = {\n${Object.entries(themeMap)
.map(([theme, variants]) =>
` ${JSON.stringify(theme)}: {\n light: ${variants.light},\n dark: ${variants.dark}\n }`
).join(',\n')}\n};`;
-fs.writeFileSync(jsOutputFile, jsOutput);
+fs.writeFileSync(jsOutputFile, jsOutput); // Write the theme styles to JavaScript file
+// Generate the Go output for theme list
const goOutput = `
package render_markdown_codehighlight
@@ -172,6 +204,6 @@ ${themeList.map(theme => `"${theme}"`).join(",\n ")},
}
`;
-fs.writeFileSync(goOutputFile, goOutput);
+fs.writeFileSync(goOutputFile, goOutput); // Write the theme list to Go file
console.log('Theme styles, Go theme list, and color information generated successfully!');
diff --git a/render-markdown-codehighlight/hooks.ts b/render-markdown-codehighlight/hooks.ts
index 1f25f41..99bf52a 100644
--- a/render-markdown-codehighlight/hooks.ts
+++ b/render-markdown-codehighlight/hooks.ts
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
import { useEffect, useState } from 'react';
import hljs from 'highlight.js';
import { themeStyles } from './themeStyles'
diff --git a/render-markdown-codehighlight/i18n/en_US.yaml b/render-markdown-codehighlight/i18n/en_US.yaml
index 94656b8..235f0ec 100644
--- a/render-markdown-codehighlight/i18n/en_US.yaml
+++ b/render-markdown-codehighlight/i18n/en_US.yaml
@@ -18,4 +18,12 @@
plugin:
render_markdown_codehighlight:
backend:
- frontend:
\ No newline at end of file
+ info:
+ name:
+ other: Markdown Code Highlight
+ description:
+ other: Highlight code blocks in Markdown content
+ config:
+ css_filtering:
+ title:
+ other: Code Highlight Theme Selection
\ No newline at end of file
diff --git a/render-markdown-codehighlight/i18n/translation.go b/render-markdown-codehighlight/i18n/translation.go
index 79ab843..4d781a3 100644
--- a/render-markdown-codehighlight/i18n/translation.go
+++ b/render-markdown-codehighlight/i18n/translation.go
@@ -23,7 +23,6 @@
InfoName = "plugin.codehighlight_markdown_render.backend.info.name"
InfoDescription = "plugin.codehighlight_markdown_render.backend.info.description"
ConfigCssFilteringTitle = "plugin.codehighlight_markdown_render.backend.config.css_filtering.title"
- ConfigCssFilteringLabel = "plugin.codehighlight_markdown_render.backend.config.css_filtering.label"
ConfigCssFilteringTitlePrefix = "plugin.codehighlight_markdown_render.backend.config."
)
\ No newline at end of file
diff --git a/render-markdown-codehighlight/i18n/zh_CN.yaml b/render-markdown-codehighlight/i18n/zh_CN.yaml
index 94656b8..cc4de1f 100644
--- a/render-markdown-codehighlight/i18n/zh_CN.yaml
+++ b/render-markdown-codehighlight/i18n/zh_CN.yaml
@@ -18,4 +18,12 @@
plugin:
render_markdown_codehighlight:
backend:
- frontend:
\ No newline at end of file
+ info:
+ name:
+ other: Markdown 代码高亮
+ description:
+ other: 高亮显示 Markdown 内容中的代码块
+ config:
+ css_filtering:
+ title:
+ other: 代码高亮主题选择
\ No newline at end of file
diff --git a/render-markdown-codehighlight/package-lock.json b/render-markdown-codehighlight/package-lock.json
deleted file mode 100644
index e4f3946..0000000
--- a/render-markdown-codehighlight/package-lock.json
+++ /dev/null
@@ -1,709 +0,0 @@
-{
- "name": "render-markdown-codehighlight",
- "version": "0.0.1",
- "lockfileVersion": 3,
- "requires": true,
- "packages": {
- "": {
- "name": "render-markdown-codehighlight",
- "version": "0.0.1",
- "devDependencies": {
- "@modyfi/vite-plugin-yaml": "^1.1.0",
- "@typescript-eslint/eslint-plugin": "^6.0.0",
- "@typescript-eslint/parser": "^6.0.0",
- "@vitejs/plugin-react-swc": "^3.3.2",
- "eslint": "^8.45.0",
- "eslint-plugin-react-hooks": "^4.6.0",
- "eslint-plugin-react-refresh": "^0.4.3",
- "typescript": "^5.0.2",
- "vite": "^4.4.5",
- "vite-plugin-css-injected-by-js": "^3.5.1",
- "vite-plugin-dts": "^3.9.1"
- },
- "peerDependencies": {
- "react": "^18.2.0",
- "react-bootstrap": "^2.10.0",
- "react-dom": "^18.2.0",
- "react-i18next": "^11.18.3"
- }
- },
- "../../../node_modules/.pnpm/@modyfi+vite-plugin-yaml@1.1.0_rollup@3.29.4_vite@4.5.3_@types+node@16.11.59_sass@1.54.9_terser@5.15.0_/node_modules/@modyfi/vite-plugin-yaml": {
- "version": "1.1.0",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@rollup/pluginutils": "5.1.0",
- "js-yaml": "4.1.0",
- "tosource": "2.0.0-alpha.3"
- },
- "devDependencies": {
- "@types/js-yaml": "4.0.9",
- "c8": "8.0.1",
- "tsup": "8.0.1",
- "typescript": "5.3.3",
- "vite": "5.0.10"
- },
- "peerDependencies": {
- "vite": "^3.2.7 || ^4.0.5 || ^5.0.5"
- }
- },
- "../../../node_modules/.pnpm/@typescript-eslint+eslint-plugin@6.11.0_@typescript-eslint+parser@6.11.0_eslint@8.53.0_typesc_j27bwzdis2pbznfm47norch7yy/node_modules/@typescript-eslint/eslint-plugin": {
- "version": "6.11.0",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@eslint-community/regexpp": "^4.5.1",
- "@typescript-eslint/scope-manager": "6.11.0",
- "@typescript-eslint/type-utils": "6.11.0",
- "@typescript-eslint/utils": "6.11.0",
- "@typescript-eslint/visitor-keys": "6.11.0",
- "debug": "^4.3.4",
- "graphemer": "^1.4.0",
- "ignore": "^5.2.4",
- "natural-compare": "^1.4.0",
- "semver": "^7.5.4",
- "ts-api-utils": "^1.0.1"
- },
- "devDependencies": {
- "@prettier/sync": "*",
- "@types/debug": "*",
- "@types/marked": "*",
- "@types/natural-compare": "*",
- "@typescript-eslint/rule-schema-to-typescript-types": "6.11.0",
- "@typescript-eslint/rule-tester": "6.11.0",
- "ajv": "^6.12.6",
- "chalk": "^5.3.0",
- "cross-fetch": "*",
- "grapheme-splitter": "^1.0.4",
- "jest": "29.7.0",
- "jest-specific-snapshot": "^8.0.0",
- "json-schema": "*",
- "markdown-table": "^3.0.3",
- "marked": "^5.1.1",
- "prettier": "^3.0.3",
- "rimraf": "*",
- "title-case": "^3.0.3",
- "tsx": "*",
- "typescript": "*"
- },
- "engines": {
- "node": "^16.0.0 || >=18.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- },
- "peerDependencies": {
- "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha",
- "eslint": "^7.0.0 || ^8.0.0"
- },
- "peerDependenciesMeta": {
- "typescript": {
- "optional": true
- }
- }
- },
- "../../../node_modules/.pnpm/@typescript-eslint+parser@6.11.0_eslint@8.53.0_typescript@5.4.2/node_modules/@typescript-eslint/parser": {
- "version": "6.11.0",
- "dev": true,
- "license": "BSD-2-Clause",
- "dependencies": {
- "@typescript-eslint/scope-manager": "6.11.0",
- "@typescript-eslint/types": "6.11.0",
- "@typescript-eslint/typescript-estree": "6.11.0",
- "@typescript-eslint/visitor-keys": "6.11.0",
- "debug": "^4.3.4"
- },
- "devDependencies": {
- "@types/glob": "*",
- "downlevel-dts": "*",
- "glob": "*",
- "jest": "29.7.0",
- "prettier": "^3.0.3",
- "rimraf": "*",
- "typescript": "*"
- },
- "engines": {
- "node": "^16.0.0 || >=18.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- },
- "peerDependencies": {
- "eslint": "^7.0.0 || ^8.0.0"
- },
- "peerDependenciesMeta": {
- "typescript": {
- "optional": true
- }
- }
- },
- "../../../node_modules/.pnpm/@vitejs+plugin-react-swc@3.7.0_@swc+helpers@0.5.3_vite@4.5.3_@types+node@16.11.59_sass@1.54.9_terser@5.15.0_/node_modules/@vitejs/plugin-react-swc": {
- "version": "3.7.0",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@swc/core": "^1.5.7"
- },
- "peerDependencies": {
- "vite": "^4 || ^5"
- }
- },
- "../../../node_modules/.pnpm/eslint-plugin-react-hooks@4.6.0_eslint@8.53.0/node_modules/eslint-plugin-react-hooks": {
- "version": "4.6.0",
- "dev": true,
- "license": "MIT",
- "devDependencies": {
- "@typescript-eslint/parser-v2": "npm:@typescript-eslint/parser@^2.26.0",
- "@typescript-eslint/parser-v3": "npm:@typescript-eslint/parser@^3.10.0",
- "@typescript-eslint/parser-v4": "npm:@typescript-eslint/parser@^4.1.0",
- "@typescript-eslint/parser-v5": "npm:@typescript-eslint/parser@^5.0.0-0"
- },
- "engines": {
- "node": ">=10"
- },
- "peerDependencies": {
- "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0"
- }
- },
- "../../../node_modules/.pnpm/eslint-plugin-react-refresh@0.4.9_eslint@8.53.0/node_modules/eslint-plugin-react-refresh": {
- "version": "0.4.9",
- "dev": true,
- "license": "MIT",
- "peerDependencies": {
- "eslint": ">=7"
- }
- },
- "../../../node_modules/.pnpm/eslint@8.53.0/node_modules/eslint": {
- "version": "8.53.0",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@eslint-community/eslint-utils": "^4.2.0",
- "@eslint-community/regexpp": "^4.6.1",
- "@eslint/eslintrc": "^2.1.3",
- "@eslint/js": "8.53.0",
- "@humanwhocodes/config-array": "^0.11.13",
- "@humanwhocodes/module-importer": "^1.0.1",
- "@nodelib/fs.walk": "^1.2.8",
- "@ungap/structured-clone": "^1.2.0",
- "ajv": "^6.12.4",
- "chalk": "^4.0.0",
- "cross-spawn": "^7.0.2",
- "debug": "^4.3.2",
- "doctrine": "^3.0.0",
- "escape-string-regexp": "^4.0.0",
- "eslint-scope": "^7.2.2",
- "eslint-visitor-keys": "^3.4.3",
- "espree": "^9.6.1",
- "esquery": "^1.4.2",
- "esutils": "^2.0.2",
- "fast-deep-equal": "^3.1.3",
- "file-entry-cache": "^6.0.1",
- "find-up": "^5.0.0",
- "glob-parent": "^6.0.2",
- "globals": "^13.19.0",
- "graphemer": "^1.4.0",
- "ignore": "^5.2.0",
- "imurmurhash": "^0.1.4",
- "is-glob": "^4.0.0",
- "is-path-inside": "^3.0.3",
- "js-yaml": "^4.1.0",
- "json-stable-stringify-without-jsonify": "^1.0.1",
- "levn": "^0.4.1",
- "lodash.merge": "^4.6.2",
- "minimatch": "^3.1.2",
- "natural-compare": "^1.4.0",
- "optionator": "^0.9.3",
- "strip-ansi": "^6.0.1",
- "text-table": "^0.2.0"
- },
- "bin": {
- "eslint": "bin/eslint.js"
- },
- "devDependencies": {
- "@babel/core": "^7.4.3",
- "@babel/preset-env": "^7.4.3",
- "@wdio/browser-runner": "^8.14.6",
- "@wdio/cli": "^8.14.6",
- "@wdio/concise-reporter": "^8.14.0",
- "@wdio/globals": "^8.14.6",
- "@wdio/mocha-framework": "^8.14.0",
- "babel-loader": "^8.0.5",
- "c8": "^7.12.0",
- "chai": "^4.0.1",
- "cheerio": "^0.22.0",
- "common-tags": "^1.8.0",
- "core-js": "^3.1.3",
- "ejs": "^3.0.2",
- "eslint": "file:.",
- "eslint-config-eslint": "file:packages/eslint-config-eslint",
- "eslint-plugin-eslint-comments": "^3.2.0",
- "eslint-plugin-eslint-plugin": "^5.1.0",
- "eslint-plugin-internal-rules": "file:tools/internal-rules",
- "eslint-plugin-jsdoc": "^46.2.5",
- "eslint-plugin-n": "^16.0.0",
- "eslint-plugin-unicorn": "^42.0.0",
- "eslint-release": "^3.2.0",
- "eslump": "^3.0.0",
- "esprima": "^4.0.1",
- "fast-glob": "^3.2.11",
- "fs-teardown": "^0.1.3",
- "glob": "^7.1.6",
- "got": "^11.8.3",
- "gray-matter": "^4.0.3",
- "lint-staged": "^11.0.0",
- "load-perf": "^0.2.0",
- "markdownlint": "^0.25.1",
- "markdownlint-cli": "^0.31.1",
- "marked": "^4.0.8",
- "memfs": "^3.0.1",
- "mocha": "^8.3.2",
- "mocha-junit-reporter": "^2.0.0",
- "node-polyfill-webpack-plugin": "^1.0.3",
- "npm-license": "^0.3.3",
- "pirates": "^4.0.5",
- "progress": "^2.0.3",
- "proxyquire": "^2.0.1",
- "recast": "^0.20.4",
- "regenerator-runtime": "^0.13.2",
- "rollup-plugin-node-polyfills": "^0.2.1",
- "semver": "^7.5.3",
- "shelljs": "^0.8.2",
- "sinon": "^11.0.0",
- "vite-plugin-commonjs": "^0.8.2",
- "webdriverio": "^8.14.6",
- "webpack": "^5.23.0",
- "webpack-cli": "^4.5.0",
- "yorkie": "^2.0.0"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- }
- },
- "../../../node_modules/.pnpm/react-bootstrap@2.10.0_@types+react@18.0.20_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-bootstrap": {
- "version": "2.10.0",
- "license": "MIT",
- "peer": true,
- "dependencies": {
- "@babel/runtime": "^7.22.5",
- "@restart/hooks": "^0.4.9",
- "@restart/ui": "^1.6.6",
- "@types/react-transition-group": "^4.4.6",
- "classnames": "^2.3.2",
- "dom-helpers": "^5.2.1",
- "invariant": "^2.2.4",
- "prop-types": "^15.8.1",
- "prop-types-extra": "^1.1.0",
- "react-transition-group": "^4.4.5",
- "uncontrollable": "^7.2.1",
- "warning": "^4.0.3"
- },
- "peerDependencies": {
- "@types/react": ">=16.14.8",
- "react": ">=16.14.0",
- "react-dom": ">=16.14.0"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- }
- }
- },
- "../../../node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom": {
- "version": "18.2.0",
- "license": "MIT",
- "peer": true,
- "dependencies": {
- "loose-envify": "^1.1.0",
- "scheduler": "^0.23.0"
- },
- "peerDependencies": {
- "react": "^18.2.0"
- }
- },
- "../../../node_modules/.pnpm/react-i18next@11.18.6_i18next@21.9.2_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-i18next": {
- "version": "11.18.6",
- "license": "MIT",
- "peer": true,
- "dependencies": {
- "@babel/runtime": "^7.14.5",
- "html-parse-stringify": "^3.0.1"
- },
- "devDependencies": {
- "@babel/cli": "^7.14.5",
- "@babel/core": "^7.14.5",
- "@babel/plugin-proposal-async-generator-functions": "^7.14.5",
- "@babel/plugin-proposal-object-rest-spread": "^7.14.5",
- "@babel/plugin-transform-modules-commonjs": "^7.14.5",
- "@babel/plugin-transform-runtime": "^7.14.5",
- "@babel/polyfill": "^7.2.5",
- "@babel/preset-env": "^7.14.5",
- "@babel/preset-react": "^7.14.5",
- "@babel/register": "^7.14.5",
- "@testing-library/jest-dom": "^5.11.6",
- "@testing-library/react": "^11.2.7",
- "@testing-library/react-hooks": "^3.4.2",
- "all-contributors-cli": "^6.20.0",
- "babel-core": "^7.0.0-bridge.0",
- "babel-eslint": "^10.0.3",
- "babel-jest": "^24.8.0",
- "babel-plugin-macros": "^2.5.0",
- "babel-plugin-tester": "^6.0.0",
- "coveralls": "^3.1.0",
- "cp-cli": "^2.0.0",
- "cross-env": "^7.0.3",
- "dtslint": "^4.1.0",
- "eslint": "^7.28.0",
- "eslint-config-airbnb": "^18.2.1",
- "eslint-config-prettier": "6.4.0",
- "eslint-plugin-import": "^2.23.4",
- "eslint-plugin-jest-dom": "^3.6.3",
- "eslint-plugin-jsx-a11y": "^6.4.1",
- "eslint-plugin-react": "^7.16.0",
- "eslint-plugin-testing-library": "^3.10.1",
- "husky": "^3.0.3",
- "i18next": "^21.0.0",
- "jest": "^24.8.0",
- "jest-cli": "^24.8.4",
- "lint-staged": "^8.1.3",
- "mkdirp": "^1.0.4",
- "prettier": "2.2.1",
- "react": "^16.10.2",
- "react-dom": "^16.10.2",
- "react-test-renderer": "^17.0.1",
- "rimraf": "2.6.3",
- "rollup": "1.19.4",
- "rollup-plugin-babel": "^4.3.2",
- "rollup-plugin-commonjs": "^10.0.2",
- "rollup-plugin-node-resolve": "^5.2.0",
- "rollup-plugin-replace": "^2.1.0",
- "rollup-plugin-terser": "^5.1.1",
- "sinon": "^7.2.3",
- "tslint": "^6.1.3",
- "typescript": "4.6.2",
- "yargs": "^13.3.0"
- },
- "peerDependencies": {
- "i18next": ">= 19.0.0",
- "react": ">= 16.8.0"
- },
- "peerDependenciesMeta": {
- "react-dom": {
- "optional": true
- },
- "react-native": {
- "optional": true
- }
- }
- },
- "../../../node_modules/.pnpm/react@18.2.0/node_modules/react": {
- "version": "18.2.0",
- "license": "MIT",
- "peer": true,
- "dependencies": {
- "loose-envify": "^1.1.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "../../../node_modules/.pnpm/typescript@5.4.2/node_modules/typescript": {
- "version": "5.4.2",
- "dev": true,
- "license": "Apache-2.0",
- "bin": {
- "tsc": "bin/tsc",
- "tsserver": "bin/tsserver"
- },
- "devDependencies": {
- "@esfx/canceltoken": "^1.0.0",
- "@octokit/rest": "^20.0.2",
- "@types/chai": "^4.3.11",
- "@types/glob": "^8.1.0",
- "@types/microsoft__typescript-etw": "^0.1.3",
- "@types/minimist": "^1.2.5",
- "@types/mocha": "^10.0.6",
- "@types/ms": "^0.7.34",
- "@types/node": "latest",
- "@types/source-map-support": "^0.5.10",
- "@types/which": "^3.0.3",
- "@typescript-eslint/eslint-plugin": "^6.19.0",
- "@typescript-eslint/parser": "^6.19.0",
- "@typescript-eslint/utils": "^6.19.0",
- "azure-devops-node-api": "^12.3.0",
- "c8": "^9.1.0",
- "chai": "^4.4.1",
- "chalk": "^4.1.2",
- "chokidar": "^3.5.3",
- "diff": "^5.1.0",
- "dprint": "^0.45.0",
- "esbuild": "^0.20.0",
- "eslint": "^8.56.0",
- "eslint-formatter-autolinkable-stylish": "^1.3.0",
- "eslint-plugin-local": "^3.1.0",
- "eslint-plugin-no-null": "^1.0.2",
- "eslint-plugin-simple-import-sort": "^10.0.0",
- "fast-xml-parser": "^4.3.3",
- "glob": "^10.3.10",
- "hereby": "^1.8.9",
- "jsonc-parser": "^3.2.0",
- "minimist": "^1.2.8",
- "mocha": "^10.2.0",
- "mocha-fivemat-progress-reporter": "^0.1.0",
- "ms": "^2.1.3",
- "node-fetch": "^3.3.2",
- "playwright": "^1.41.0",
- "source-map-support": "^0.5.21",
- "tslib": "^2.6.2",
- "typescript": "5.4.0-dev.20240119",
- "which": "^3.0.1"
- },
- "engines": {
- "node": ">=14.17"
- }
- },
- "../../../node_modules/.pnpm/vite-plugin-dts@3.9.1_@types+node@16.11.59_rollup@3.29.4_typescript@5.4.2_vite@4.5.3_@types+n_ufetuueabzabk4d7dqgvhiagly/node_modules/vite-plugin-dts": {
- "version": "3.9.1",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@microsoft/api-extractor": "7.43.0",
- "@rollup/pluginutils": "^5.1.0",
- "@vue/language-core": "^1.8.27",
- "debug": "^4.3.4",
- "kolorist": "^1.8.0",
- "magic-string": "^0.30.8",
- "vue-tsc": "^1.8.27"
- },
- "devDependencies": {
- "@commitlint/cli": "^19.2.1",
- "@types/debug": "^4.1.12",
- "@types/minimist": "^1.2.5",
- "@types/node": "^20.11.30",
- "@types/prompts": "^2.4.9",
- "@types/semver": "^7.5.8",
- "@vexip-ui/commitlint-config": "^0.4.0",
- "@vexip-ui/eslint-config": "^0.12.0",
- "@vexip-ui/prettier-config": "^0.2.0",
- "@vue/eslint-config-standard": "^8.0.1",
- "@vue/eslint-config-typescript": "^13.0.0",
- "conventional-changelog-cli": "^4.1.0",
- "eslint": "^8.57.0",
- "execa": "^8.0.1",
- "husky": "^9.0.11",
- "is-ci": "^3.0.1",
- "lint-staged": "^15.2.2",
- "minimist": "^1.2.8",
- "pinst": "^3.0.0",
- "prettier": "^3.2.5",
- "pretty-quick": "^4.0.0",
- "prompts": "^2.4.2",
- "rimraf": "^5.0.5",
- "semver": "^7.6.0",
- "tsx": "^4.7.1",
- "typescript": "5.4.3",
- "unbuild": "^2.0.0",
- "vite": "^5.2.6",
- "vitest": "^1.4.0"
- },
- "engines": {
- "node": "^14.18.0 || >=16.0.0"
- },
- "peerDependencies": {
- "typescript": "*",
- "vite": "*"
- },
- "peerDependenciesMeta": {
- "vite": {
- "optional": true
- }
- }
- },
- "../../../node_modules/.pnpm/vite@4.5.3_@types+node@16.11.59_sass@1.54.9_terser@5.15.0/node_modules/vite": {
- "version": "4.5.3",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "esbuild": "^0.18.10",
- "postcss": "^8.4.27",
- "rollup": "^3.27.1"
- },
- "bin": {
- "vite": "bin/vite.js"
- },
- "devDependencies": {
- "@ampproject/remapping": "^2.2.1",
- "@babel/parser": "^7.22.7",
- "@babel/types": "^7.22.5",
- "@jridgewell/trace-mapping": "^0.3.18",
- "@rollup/plugin-alias": "^4.0.4",
- "@rollup/plugin-commonjs": "^25.0.3",
- "@rollup/plugin-dynamic-import-vars": "^2.0.4",
- "@rollup/plugin-json": "^6.0.0",
- "@rollup/plugin-node-resolve": "15.1.0",
- "@rollup/plugin-typescript": "^11.1.2",
- "@rollup/pluginutils": "^5.0.2",
- "@types/escape-html": "^1.0.2",
- "@types/pnpapi": "^0.0.2",
- "acorn": "^8.10.0",
- "acorn-walk": "^8.2.0",
- "cac": "^6.7.14",
- "chokidar": "^3.5.3",
- "connect": "^3.7.0",
- "connect-history-api-fallback": "^2.0.0",
- "convert-source-map": "^2.0.0",
- "cors": "^2.8.5",
- "cross-spawn": "^7.0.3",
- "debug": "^4.3.4",
- "dep-types": "link:./src/types",
- "dotenv": "^16.3.1",
- "dotenv-expand": "^9.0.0",
- "es-module-lexer": "^1.3.0",
- "escape-html": "^1.0.3",
- "estree-walker": "^3.0.3",
- "etag": "^1.8.1",
- "fast-glob": "^3.3.1",
- "http-proxy": "^1.18.1",
- "json-stable-stringify": "^1.0.2",
- "launch-editor-middleware": "^2.6.0",
- "lightningcss": "^1.21.5",
- "magic-string": "^0.30.2",
- "micromatch": "^4.0.5",
- "mlly": "^1.4.0",
- "mrmime": "^1.0.1",
- "okie": "^1.0.1",
- "open": "^8.4.2",
- "parse5": "^7.1.2",
- "periscopic": "^3.1.0",
- "picocolors": "^1.0.0",
- "picomatch": "^2.3.1",
- "postcss-import": "^15.1.0",
- "postcss-load-config": "^4.0.1",
- "postcss-modules": "^6.0.0",
- "resolve.exports": "^2.0.2",
- "rollup-plugin-license": "^3.0.1",
- "sirv": "^2.0.3",
- "source-map-support": "^0.5.21",
- "strip-ansi": "^7.1.0",
- "strip-literal": "^1.3.0",
- "tsconfck": "^2.1.2",
- "tslib": "^2.6.1",
- "types": "link:./types",
- "ufo": "^1.2.0",
- "ws": "^8.13.0"
- },
- "engines": {
- "node": "^14.18.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/vitejs/vite?sponsor=1"
- },
- "optionalDependencies": {
- "fsevents": "~2.3.2"
- },
- "peerDependencies": {
- "@types/node": ">= 14",
- "less": "*",
- "lightningcss": "^1.21.0",
- "sass": "*",
- "stylus": "*",
- "sugarss": "*",
- "terser": "^5.4.0"
- },
- "peerDependenciesMeta": {
- "@types/node": {
- "optional": true
- },
- "less": {
- "optional": true
- },
- "lightningcss": {
- "optional": true
- },
- "sass": {
- "optional": true
- },
- "stylus": {
- "optional": true
- },
- "sugarss": {
- "optional": true
- },
- "terser": {
- "optional": true
- }
- }
- },
- "node_modules/@modyfi/vite-plugin-yaml": {
- "resolved": "../../../node_modules/.pnpm/@modyfi+vite-plugin-yaml@1.1.0_rollup@3.29.4_vite@4.5.3_@types+node@16.11.59_sass@1.54.9_terser@5.15.0_/node_modules/@modyfi/vite-plugin-yaml",
- "link": true
- },
- "node_modules/@typescript-eslint/eslint-plugin": {
- "resolved": "../../../node_modules/.pnpm/@typescript-eslint+eslint-plugin@6.11.0_@typescript-eslint+parser@6.11.0_eslint@8.53.0_typesc_j27bwzdis2pbznfm47norch7yy/node_modules/@typescript-eslint/eslint-plugin",
- "link": true
- },
- "node_modules/@typescript-eslint/parser": {
- "resolved": "../../../node_modules/.pnpm/@typescript-eslint+parser@6.11.0_eslint@8.53.0_typescript@5.4.2/node_modules/@typescript-eslint/parser",
- "link": true
- },
- "node_modules/@vitejs/plugin-react-swc": {
- "resolved": "../../../node_modules/.pnpm/@vitejs+plugin-react-swc@3.7.0_@swc+helpers@0.5.3_vite@4.5.3_@types+node@16.11.59_sass@1.54.9_terser@5.15.0_/node_modules/@vitejs/plugin-react-swc",
- "link": true
- },
- "node_modules/eslint": {
- "resolved": "../../../node_modules/.pnpm/eslint@8.53.0/node_modules/eslint",
- "link": true
- },
- "node_modules/eslint-plugin-react-hooks": {
- "resolved": "../../../node_modules/.pnpm/eslint-plugin-react-hooks@4.6.0_eslint@8.53.0/node_modules/eslint-plugin-react-hooks",
- "link": true
- },
- "node_modules/eslint-plugin-react-refresh": {
- "resolved": "../../../node_modules/.pnpm/eslint-plugin-react-refresh@0.4.9_eslint@8.53.0/node_modules/eslint-plugin-react-refresh",
- "link": true
- },
- "node_modules/react": {
- "resolved": "../../../node_modules/.pnpm/react@18.2.0/node_modules/react",
- "link": true
- },
- "node_modules/react-bootstrap": {
- "resolved": "../../../node_modules/.pnpm/react-bootstrap@2.10.0_@types+react@18.0.20_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-bootstrap",
- "link": true
- },
- "node_modules/react-dom": {
- "resolved": "../../../node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom",
- "link": true
- },
- "node_modules/react-i18next": {
- "resolved": "../../../node_modules/.pnpm/react-i18next@11.18.6_i18next@21.9.2_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-i18next",
- "link": true
- },
- "node_modules/typescript": {
- "resolved": "../../../node_modules/.pnpm/typescript@5.4.2/node_modules/typescript",
- "link": true
- },
- "node_modules/vite": {
- "resolved": "../../../node_modules/.pnpm/vite@4.5.3_@types+node@16.11.59_sass@1.54.9_terser@5.15.0/node_modules/vite",
- "link": true
- },
- "node_modules/vite-plugin-css-injected-by-js": {
- "version": "3.5.1",
- "resolved": "https://registry.npmjs.org/vite-plugin-css-injected-by-js/-/vite-plugin-css-injected-by-js-3.5.1.tgz",
- "integrity": "sha512-9ioqwDuEBxW55gNoWFEDhfLTrVKXEEZgl5adhWmmqa88EQGKfTmexy4v1Rh0pAS6RhKQs2bUYQArprB32JpUZQ==",
- "dev": true,
- "license": "MIT",
- "peerDependencies": {
- "vite": ">2.0.0-0"
- }
- },
- "node_modules/vite-plugin-dts": {
- "resolved": "../../../node_modules/.pnpm/vite-plugin-dts@3.9.1_@types+node@16.11.59_rollup@3.29.4_typescript@5.4.2_vite@4.5.3_@types+n_ufetuueabzabk4d7dqgvhiagly/node_modules/vite-plugin-dts",
- "link": true
- }
- }
-}
diff --git a/render-markdown-codehighlight/render_markdown_codehighlight.go b/render-markdown-codehighlight/renderMarkdownCodehighlight.go
similarity index 98%
rename from render-markdown-codehighlight/render_markdown_codehighlight.go
rename to render-markdown-codehighlight/renderMarkdownCodehighlight.go
index 285e0fa..e700fdd 100644
--- a/render-markdown-codehighlight/render_markdown_codehighlight.go
+++ b/render-markdown-codehighlight/renderMarkdownCodehighlight.go
@@ -24,7 +24,7 @@
"encoding/json"
"log"
"github.com/gin-gonic/gin"
- "strings"
+ "strings" // Import the strings package
"github.com/apache/incubator-answer-plugins/render-markdown-codehighlight/i18n"
"github.com/apache/incubator-answer-plugins/util"
"github.com/apache/incubator-answer/plugin"
diff --git a/render-markdown-codehighlight/themeColors.js b/render-markdown-codehighlight/themeColors.js
deleted file mode 100644
index 10086e7..0000000
--- a/render-markdown-codehighlight/themeColors.js
+++ /dev/null
@@ -1,217 +0,0 @@
-export const themeColors = [
- {
- "theme": "agate",
- "variant": "dark",
- "color": "#333"
- },
- {
- "theme": "an",
- "variant": "dark",
- "color": "#1c1d21"
- },
- {
- "theme": "androidstudio",
- "variant": "dark",
- "color": "#282b2e"
- },
- {
- "theme": "arta",
- "variant": "dark",
- "color": "#222"
- },
- {
- "theme": "ascetic",
- "variant": "light",
- "color": "#fff"
- },
- {
- "theme": "codepen",
- "variant": "dark",
- "color": "#222"
- },
- {
- "theme": "color",
- "variant": "light",
- "color": "#fff"
- },
- {
- "theme": "dark",
- "variant": "dark",
- "color": "#303030"
- },
- {
- "theme": "default",
- "variant": "light",
- "color": "#f3f3f3"
- },
- {
- "theme": "devibeans",
- "variant": "dark",
- "color": "#000"
- },
- {
- "theme": "docco",
- "variant": "light",
- "color": "#f8f8ff"
- },
- {
- "theme": "far",
- "variant": "dark",
- "color": "navy"
- },
- {
- "theme": "felipec",
- "variant": "dark",
- "color": "#1e1e22"
- },
- {
- "theme": "foundation",
- "variant": "light",
- "color": "#eee"
- },
- {
- "theme": "github",
- "variant": "light",
- "color": "#fff"
- },
- {
- "theme": "gml",
- "variant": "dark",
- "color": "#222"
- },
- {
- "theme": "googlecode",
- "variant": "light",
- "color": "#fff"
- },
- {
- "theme": "grayscale",
- "variant": "light",
- "color": "#fff"
- },
- {
- "theme": "hybrid",
- "variant": "dark",
- "color": "#1d1f21"
- },
- {
- "theme": "idea",
- "variant": "light",
- "color": "#fff"
- },
- {
- "theme": "ir",
- "variant": "dark",
- "color": "#000"
- },
- {
- "theme": "lightfair",
- "variant": "light",
- "color": "#fff"
- },
- {
- "theme": "lioshi",
- "variant": "dark",
- "color": "#303030"
- },
- {
- "theme": "magula",
- "variant": "light",
- "color": "#f4f4f4"
- },
- {
- "theme": "mono",
- "variant": "light",
- "color": "#eaeef3"
- },
- {
- "theme": "monokai",
- "variant": "dark",
- "color": "#23241f"
- },
- {
- "theme": "monokai",
- "variant": "dark",
- "color": "#272822"
- },
- {
- "theme": "night",
- "variant": "dark",
- "color": "#011627"
- },
- {
- "theme": "nord",
- "variant": "dark",
- "color": "#2e3440"
- },
- {
- "theme": "obsidian",
- "variant": "dark",
- "color": "#282b2e"
- },
- {
- "theme": "purebasic",
- "variant": "light",
- "color": "#ffffdf"
- },
- {
- "theme": "rainbow",
- "variant": "dark",
- "color": "#474949"
- },
- {
- "theme": "routeros",
- "variant": "light",
- "color": "#f0f0f0"
- },
- {
- "theme": "school",
- "variant": "light",
- "color": "#f6f5b2"
- },
- {
- "theme": "shades",
- "variant": "dark",
- "color": "#2d2b57"
- },
- {
- "theme": "srcery",
- "variant": "dark",
- "color": "#1c1b19"
- },
- {
- "theme": "sunburst",
- "variant": "dark",
- "color": "#000"
- },
- {
- "theme": "tomorrow",
- "variant": "dark",
- "color": "#002451"
- },
- {
- "theme": "tomorrow",
- "variant": "dark",
- "color": "#000"
- },
- {
- "theme": "vs",
- "variant": "light",
- "color": "#fff"
- },
- {
- "theme": "vs2015",
- "variant": "dark",
- "color": "#1e1e1e"
- },
- {
- "theme": "xcode",
- "variant": "light",
- "color": "#fff"
- },
- {
- "theme": "xt256",
- "variant": "dark",
- "color": "#000"
- }
-];
\ No newline at end of file
diff --git a/render-markdown-codehighlight/themeStyles.js b/render-markdown-codehighlight/themeStyles.js
deleted file mode 100644
index e4e3bdd..0000000
--- a/render-markdown-codehighlight/themeStyles.js
+++ /dev/null
@@ -1,230 +0,0 @@
-export const themeStyles = {
- "1c": {
- light: () => import('highlight.js/styles/1c-light.min.css?inline'),
- dark: () => import('highlight.js/styles/a11y-dark.min.css?inline')
- },
- "a11y": {
- light: () => import('highlight.js/styles/a11y-light.min.css?inline'),
- dark: () => import('highlight.js/styles/a11y-dark.min.css?inline')
- },
- "agate": {
- light: () => import('highlight.js/styles/1c-light.min.css?inline'),
- dark: () => import('highlight.js/styles/agate.min.css?inline')
- },
- "an": {
- light: () => import('highlight.js/styles/1c-light.min.css?inline'),
- dark: () => import('highlight.js/styles/an-old-hope.min.css?inline')
- },
- "androidstudio": {
- light: () => import('highlight.js/styles/1c-light.min.css?inline'),
- dark: () => import('highlight.js/styles/androidstudio.min.css?inline')
- },
- "arduino": {
- light: () => import('highlight.js/styles/arduino-light.min.css?inline'),
- dark: () => import('highlight.js/styles/a11y-dark.min.css?inline')
- },
- "arta": {
- light: () => import('highlight.js/styles/1c-light.min.css?inline'),
- dark: () => import('highlight.js/styles/arta.min.css?inline')
- },
- "ascetic": {
- light: () => import('highlight.js/styles/ascetic.min.css?inline'),
- dark: () => import('highlight.js/styles/a11y-dark.min.css?inline')
- },
- "atom": {
- light: () => import('highlight.js/styles/atom-one-light.min.css?inline'),
- dark: () => import('highlight.js/styles/atom-one-dark.min.css?inline')
- },
- "brown": {
- light: () => import('highlight.js/styles/brown-paper.min.css?inline'),
- dark: () => import('highlight.js/styles/a11y-dark.min.css?inline')
- },
- "codepen": {
- light: () => import('highlight.js/styles/1c-light.min.css?inline'),
- dark: () => import('highlight.js/styles/codepen-embed.min.css?inline')
- },
- "color": {
- light: () => import('highlight.js/styles/color-brewer.min.css?inline'),
- dark: () => import('highlight.js/styles/a11y-dark.min.css?inline')
- },
- "dark": {
- light: () => import('highlight.js/styles/1c-light.min.css?inline'),
- dark: () => import('highlight.js/styles/dark.min.css?inline')
- },
- "default": {
- light: () => import('highlight.js/styles/default.min.css?inline'),
- dark: () => import('highlight.js/styles/a11y-dark.min.css?inline')
- },
- "devibeans": {
- light: () => import('highlight.js/styles/1c-light.min.css?inline'),
- dark: () => import('highlight.js/styles/devibeans.min.css?inline')
- },
- "docco": {
- light: () => import('highlight.js/styles/docco.min.css?inline'),
- dark: () => import('highlight.js/styles/a11y-dark.min.css?inline')
- },
- "far": {
- light: () => import('highlight.js/styles/1c-light.min.css?inline'),
- dark: () => import('highlight.js/styles/far.min.css?inline')
- },
- "felipec": {
- light: () => import('highlight.js/styles/1c-light.min.css?inline'),
- dark: () => import('highlight.js/styles/felipec.min.css?inline')
- },
- "foundation": {
- light: () => import('highlight.js/styles/foundation.min.css?inline'),
- dark: () => import('highlight.js/styles/a11y-dark.min.css?inline')
- },
- "github": {
- light: () => import('highlight.js/styles/github.min.css?inline'),
- dark: () => import('highlight.js/styles/github-dark.min.css?inline')
- },
- "gml": {
- light: () => import('highlight.js/styles/1c-light.min.css?inline'),
- dark: () => import('highlight.js/styles/gml.min.css?inline')
- },
- "googlecode": {
- light: () => import('highlight.js/styles/googlecode.min.css?inline'),
- dark: () => import('highlight.js/styles/a11y-dark.min.css?inline')
- },
- "gradient": {
- light: () => import('highlight.js/styles/gradient-light.min.css?inline'),
- dark: () => import('highlight.js/styles/gradient-dark.min.css?inline')
- },
- "grayscale": {
- light: () => import('highlight.js/styles/grayscale.min.css?inline'),
- dark: () => import('highlight.js/styles/a11y-dark.min.css?inline')
- },
- "hybrid": {
- light: () => import('highlight.js/styles/1c-light.min.css?inline'),
- dark: () => import('highlight.js/styles/hybrid.min.css?inline')
- },
- "idea": {
- light: () => import('highlight.js/styles/idea.min.css?inline'),
- dark: () => import('highlight.js/styles/a11y-dark.min.css?inline')
- },
- "intellij": {
- light: () => import('highlight.js/styles/intellij-light.min.css?inline'),
- dark: () => import('highlight.js/styles/a11y-dark.min.css?inline')
- },
- "ir": {
- light: () => import('highlight.js/styles/1c-light.min.css?inline'),
- dark: () => import('highlight.js/styles/ir-black.min.css?inline')
- },
- "isbl": {
- light: () => import('highlight.js/styles/isbl-editor-light.min.css?inline'),
- dark: () => import('highlight.js/styles/isbl-editor-dark.min.css?inline')
- },
- "kimbie": {
- light: () => import('highlight.js/styles/kimbie-light.min.css?inline'),
- dark: () => import('highlight.js/styles/kimbie-dark.min.css?inline')
- },
- "lightfair": {
- light: () => import('highlight.js/styles/lightfair.min.css?inline'),
- dark: () => import('highlight.js/styles/a11y-dark.min.css?inline')
- },
- "lioshi": {
- light: () => import('highlight.js/styles/1c-light.min.css?inline'),
- dark: () => import('highlight.js/styles/lioshi.min.css?inline')
- },
- "magula": {
- light: () => import('highlight.js/styles/magula.min.css?inline'),
- dark: () => import('highlight.js/styles/a11y-dark.min.css?inline')
- },
- "mono": {
- light: () => import('highlight.js/styles/mono-blue.min.css?inline'),
- dark: () => import('highlight.js/styles/a11y-dark.min.css?inline')
- },
- "monokai": {
- light: () => import('highlight.js/styles/1c-light.min.css?inline'),
- dark: () => import('highlight.js/styles/monokai.min.css?inline')
- },
- "night": {
- light: () => import('highlight.js/styles/1c-light.min.css?inline'),
- dark: () => import('highlight.js/styles/night-owl.min.css?inline')
- },
- "nnfx": {
- light: () => import('highlight.js/styles/nnfx-light.min.css?inline'),
- dark: () => import('highlight.js/styles/nnfx-dark.min.css?inline')
- },
- "nord": {
- light: () => import('highlight.js/styles/1c-light.min.css?inline'),
- dark: () => import('highlight.js/styles/nord.min.css?inline')
- },
- "obsidian": {
- light: () => import('highlight.js/styles/1c-light.min.css?inline'),
- dark: () => import('highlight.js/styles/obsidian.min.css?inline')
- },
- "panda": {
- light: () => import('highlight.js/styles/panda-syntax-light.min.css?inline'),
- dark: () => import('highlight.js/styles/panda-syntax-dark.min.css?inline')
- },
- "paraiso": {
- light: () => import('highlight.js/styles/paraiso-light.min.css?inline'),
- dark: () => import('highlight.js/styles/paraiso-dark.min.css?inline')
- },
- "pojoaque": {
- light: () => import('highlight.js/styles/pojoaque.min.css?inline'),
- dark: () => import('highlight.js/styles/a11y-dark.min.css?inline')
- },
- "purebasic": {
- light: () => import('highlight.js/styles/purebasic.min.css?inline'),
- dark: () => import('highlight.js/styles/a11y-dark.min.css?inline')
- },
- "qtcreator": {
- light: () => import('highlight.js/styles/qtcreator-light.min.css?inline'),
- dark: () => import('highlight.js/styles/qtcreator-dark.min.css?inline')
- },
- "rainbow": {
- light: () => import('highlight.js/styles/1c-light.min.css?inline'),
- dark: () => import('highlight.js/styles/rainbow.min.css?inline')
- },
- "routeros": {
- light: () => import('highlight.js/styles/routeros.min.css?inline'),
- dark: () => import('highlight.js/styles/a11y-dark.min.css?inline')
- },
- "school": {
- light: () => import('highlight.js/styles/school-book.min.css?inline'),
- dark: () => import('highlight.js/styles/a11y-dark.min.css?inline')
- },
- "shades": {
- light: () => import('highlight.js/styles/1c-light.min.css?inline'),
- dark: () => import('highlight.js/styles/shades-of-purple.min.css?inline')
- },
- "srcery": {
- light: () => import('highlight.js/styles/1c-light.min.css?inline'),
- dark: () => import('highlight.js/styles/srcery.min.css?inline')
- },
- "stackoverflow": {
- light: () => import('highlight.js/styles/stackoverflow-light.min.css?inline'),
- dark: () => import('highlight.js/styles/stackoverflow-dark.min.css?inline')
- },
- "sunburst": {
- light: () => import('highlight.js/styles/1c-light.min.css?inline'),
- dark: () => import('highlight.js/styles/sunburst.min.css?inline')
- },
- "tokyo": {
- light: () => import('highlight.js/styles/tokyo-night-light.min.css?inline'),
- dark: () => import('highlight.js/styles/tokyo-night-dark.min.css?inline')
- },
- "tomorrow": {
- light: () => import('highlight.js/styles/1c-light.min.css?inline'),
- dark: () => import('highlight.js/styles/tomorrow-night-bright.min.css?inline')
- },
- "vs": {
- light: () => import('highlight.js/styles/vs.min.css?inline'),
- dark: () => import('highlight.js/styles/a11y-dark.min.css?inline')
- },
- "vs2015": {
- light: () => import('highlight.js/styles/1c-light.min.css?inline'),
- dark: () => import('highlight.js/styles/vs2015.min.css?inline')
- },
- "xcode": {
- light: () => import('highlight.js/styles/xcode.min.css?inline'),
- dark: () => import('highlight.js/styles/a11y-dark.min.css?inline')
- },
- "xt256": {
- light: () => import('highlight.js/styles/1c-light.min.css?inline'),
- dark: () => import('highlight.js/styles/xt256.min.css?inline')
- }
-};
\ No newline at end of file
diff --git a/render-markdown-codehighlight/theme_list.go b/render-markdown-codehighlight/theme_list.go
deleted file mode 100644
index 831b2f2..0000000
--- a/render-markdown-codehighlight/theme_list.go
+++ /dev/null
@@ -1,62 +0,0 @@
-
-package render_markdown_codehighlight
-
-var ThemeList = []string{
-"1c-light",
- "a11y-all",
- "agate-dark",
- "an-dark",
- "androidstudio-dark",
- "arduino-light",
- "arta-dark",
- "ascetic-light",
- "atom-all",
- "brown-light",
- "codepen-dark",
- "color-light",
- "dark-dark",
- "default-light",
- "devibeans-dark",
- "docco-light",
- "far-dark",
- "felipec-dark",
- "foundation-light",
- "github-all",
- "gml-dark",
- "googlecode-light",
- "gradient-all",
- "grayscale-light",
- "hybrid-dark",
- "idea-light",
- "intellij-light",
- "ir-dark",
- "isbl-all",
- "kimbie-all",
- "lightfair-light",
- "lioshi-dark",
- "magula-light",
- "mono-light",
- "monokai-dark",
- "night-dark",
- "nnfx-all",
- "nord-dark",
- "obsidian-dark",
- "panda-all",
- "paraiso-all",
- "pojoaque-light",
- "purebasic-light",
- "qtcreator-all",
- "rainbow-dark",
- "routeros-light",
- "school-light",
- "shades-dark",
- "srcery-dark",
- "stackoverflow-all",
- "sunburst-dark",
- "tokyo-all",
- "tomorrow-dark",
- "vs-light",
- "vs2015-dark",
- "xcode-light",
- "xt256-dark",
-}