0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-10 00:32:45 +00:00

Remove deprecated options

This commit is contained in:
Trevor Buckner
2023-05-31 11:14:57 -04:00
parent 3ed9702ef2
commit 2c73e59eb0
3 changed files with 17662 additions and 17620 deletions

38
package-lock.json generated
View File

@@ -31,6 +31,8 @@
"lodash": "^4.17.21", "lodash": "^4.17.21",
"marked": "5.0.4", "marked": "5.0.4",
"marked-extended-tables": "^1.0.6", "marked-extended-tables": "^1.0.6",
"marked-gfm-heading-id": "^3.0.3",
"marked-smartypants": "^1.0.2",
"markedLegacy": "npm:marked@^0.3.19", "markedLegacy": "npm:marked@^0.3.19",
"moment": "^2.29.4", "moment": "^2.29.4",
"mongoose": "^7.2.1", "mongoose": "^7.2.1",
@@ -6413,6 +6415,11 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/github-slugger": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-2.0.0.tgz",
"integrity": "sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw=="
},
"node_modules/glob": { "node_modules/glob": {
"version": "7.2.3", "version": "7.2.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
@@ -9666,6 +9673,28 @@
"marked": "^3.0.0 || ^4.0.0 || ^5.0.0" "marked": "^3.0.0 || ^4.0.0 || ^5.0.0"
} }
}, },
"node_modules/marked-gfm-heading-id": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/marked-gfm-heading-id/-/marked-gfm-heading-id-3.0.3.tgz",
"integrity": "sha512-ouAOxtHYa34yFocjCk5xIIcEjg40YXNdpkfLqH6TGbkmXPMPxApWXLdOi0Z1AXUweMQC9bWt2e8MGrIYB2f6+w==",
"dependencies": {
"github-slugger": "^2.0.0"
},
"peerDependencies": {
"marked": "^4 || ^5"
}
},
"node_modules/marked-smartypants": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/marked-smartypants/-/marked-smartypants-1.0.2.tgz",
"integrity": "sha512-hpbM9waiBSIHpqdoU5AAeuYozeObBwUet3xkCFrFBA+1329byRVxLDwYmelMCS3ss+sEVJhDgrunIy+ubiqFwQ==",
"dependencies": {
"smartypants": "^0.1.6"
},
"peerDependencies": {
"marked": "^4 || ^5"
}
},
"node_modules/markedLegacy": { "node_modules/markedLegacy": {
"name": "marked", "name": "marked",
"version": "0.3.19", "version": "0.3.19",
@@ -15304,6 +15333,15 @@
"npm": ">= 3.0.0" "npm": ">= 3.0.0"
} }
}, },
"node_modules/smartypants": {
"version": "0.1.6",
"resolved": "https://registry.npmjs.org/smartypants/-/smartypants-0.1.6.tgz",
"integrity": "sha512-zGXh+Q6Y3OPTLM5x2HxAIkEAj4ZcePftmIOdIYozv2T+m03Sp5R4YppczKuo6IdnSMc99U+Wgvy8Mil0eeep7g==",
"bin": {
"smartypants": "bin/smartypants.js",
"smartypantsu": "bin/smartypantsu.js"
}
},
"node_modules/snapdragon": { "node_modules/snapdragon": {
"version": "0.8.2", "version": "0.8.2",
"resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",

View File

@@ -99,6 +99,8 @@
"lodash": "^4.17.21", "lodash": "^4.17.21",
"marked": "5.0.4", "marked": "5.0.4",
"marked-extended-tables": "^1.0.6", "marked-extended-tables": "^1.0.6",
"marked-gfm-heading-id": "^3.0.3",
"marked-smartypants": "^1.0.2",
"markedLegacy": "npm:marked@^0.3.19", "markedLegacy": "npm:marked@^0.3.19",
"moment": "^2.29.4", "moment": "^2.29.4",
"mongoose": "^7.2.1", "mongoose": "^7.2.1",

View File

@@ -2,6 +2,8 @@
const _ = require('lodash'); const _ = require('lodash');
const Marked = require('marked'); const Marked = require('marked');
const MarkedExtendedTables = require('marked-extended-tables'); const MarkedExtendedTables = require('marked-extended-tables');
const {gfmHeadingId: MarkedGFMHeadingId} = require('marked-gfm-heading-id');
const {markedSmartypants: MarkedSmartyPants} = require('marked-smartypants');
const renderer = new Marked.Renderer(); const renderer = new Marked.Renderer();
//Processes the markdown within an HTML block if it's just a class-wrapper //Processes the markdown within an HTML block if it's just a class-wrapper
@@ -237,9 +239,9 @@ const definitionLists = {
}; };
Marked.use({ extensions: [mustacheSpans, mustacheDivs, mustacheInjectInline, definitionLists] }); Marked.use({ extensions: [mustacheSpans, mustacheDivs, mustacheInjectInline, definitionLists] });
Marked.use(MarkedExtendedTables());
Marked.use(mustacheInjectBlock); Marked.use(mustacheInjectBlock);
Marked.use({ renderer: renderer, smartypants: true }); Marked.use({ renderer: renderer, smartypants: true, mangle: false, smartypants: false });
Marked.use(MarkedExtendedTables(), MarkedGFMHeadingId(), MarkedSmartyPants());
//Fix local links in the Preview iFrame to link inside the frame //Fix local links in the Preview iFrame to link inside the frame
renderer.link = function (href, title, text) { renderer.link = function (href, title, text) {