Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlight fix API call #134

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@ module.exports = {
join(__dirname, "src", "test", "tsconfig.json"),
join(__dirname, "src", "tests", "tsconfig.json")
]
}
},
rules: {
"@typescript-eslint/no-var-requires": 0
}
};
7,218 changes: 3,851 additions & 3,367 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
},
"dependencies": {
"@manuth/package-json-editor": "^2.2.3",
"@manuth/resource-manager": "^2.0.2",
"@manuth/resource-manager": "^2.0.3",
"@manuth/temp-files": "^2.0.7",
"@types/markdown-it": "^12.2.2",
"cheerio": "^1.0.0-rc.10",
Expand All @@ -65,7 +65,7 @@
"get-uri": "^4.0.0",
"glob": "^7.2.0",
"handlebars": "^4.7.7",
"highlight.js": "^11.2.0",
"highlight.js": "^11.3.1",
"lodash.clonedeep": "^4.5.0",
"markdown-it": "^12.2.0",
"markdown-it-anchor": "^8.3.1",
Expand Down Expand Up @@ -93,7 +93,6 @@
"@types/dedent": "^0.7.0",
"@types/fs-extra": "^9.0.13",
"@types/glob": "^7.1.4",
"@types/highlight.js": "^9.12.4",
"@types/lodash.clonedeep": "^4.5.6",
"@types/lodash.kebabcase": "^4.1.6",
"@types/markdown-it-container": "^2.0.4",
Expand All @@ -112,6 +111,10 @@
"@types/website-scraper": "^1.2.6",
"@types/yamljs": "^0.2.31",
"eslint": "^7.32.0",
"eslint-plugin-deprecation": "^1.2.1",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jsdoc": "^37.2.0",
"eslint-plugin-node": "^11.1.0",
"json5-loader": "^4.0.1",
"lodash.kebabcase": "^4.1.1",
"markdown-it-include": "^2.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/System/Tasks/ConversionRunner.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CultureInfo } from "@manuth/resource-manager";
import { TempDirectory } from "@manuth/temp-files";
import { pathExists, readFile } from "fs-extra";
import { highlight } from "highlight.js";
import hljs from "highlight.js";
import cloneDeep = require("lodash.clonedeep");
import MarkdownIt = require("markdown-it");
import checkbox = require("markdown-it-checkbox");
Expand Down Expand Up @@ -440,7 +440,7 @@ export class ConversionRunner
{
if (Settings.Default.HighlightStyle !== "None")
{
subject = highlight(language, subject, true).value;
subject = hljs.highlight(subject, { language: "markdown", ignoreIllegals: true }).value;
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ConfigInterceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { TestContext } from "./TestContext";
* @template TSection
* The type of the configuration in the section to intercept.
*/
export class ConfigInterceptor<TSection extends any = any>
export class ConfigInterceptor<TSection = any>
{
/**
* The target of the interception.
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ITestContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @template TSection
* The type of the intercepted settings-section.
*/
export interface ITestContext<TSection extends any = any>
export interface ITestContext<TSection = any>
{
/**
* Gets or sets the intercepted settings.
Expand Down
2 changes: 1 addition & 1 deletion src/tests/TestContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ITestContext } from "./ITestContext";
* @template TSection
* The type of the intercepted settings-section.
*/
export class TestContext<TSection extends any = any> implements ITestContext<TSection>
export class TestContext<TSection = any> implements ITestContext<TSection>
{
/**
* The config-interceptor of this context.
Expand Down