DEV: Removing unused lines of code.

The code had no effect on how the markdown-it is being configured.
This commit is contained in:
Alan Guo Xiang Tan 2022-01-06 15:28:32 +08:00
parent 7138ebed05
commit bdc868246f
2 changed files with 2 additions and 10 deletions

View File

@ -374,7 +374,7 @@ export function setup(opts, siteSettings, state) {
opts.engine = window.markdownit({ opts.engine = window.markdownit({
discourse: opts.discourse, discourse: opts.discourse,
html: true, html: true,
breaks: opts.discourse.features.newline, breaks: !siteSettings.traditional_markdown_linebreaks,
xhtmlOut: false, xhtmlOut: false,
linkify: siteSettings.enable_markdown_linkify, linkify: siteSettings.enable_markdown_linkify,
typographer: siteSettings.enable_markdown_typographer, typographer: siteSettings.enable_markdown_typographer,

View File

@ -33,7 +33,6 @@ export function buildOptions(state) {
emojiUnicodeReplacer, emojiUnicodeReplacer,
lookupUploadUrls, lookupUploadUrls,
previewing, previewing,
linkify,
censoredRegexp, censoredRegexp,
disableEmojis, disableEmojis,
customEmojiTranslation, customEmojiTranslation,
@ -41,14 +40,7 @@ export function buildOptions(state) {
watchedWordsLink, watchedWordsLink,
} = state; } = state;
// These are markdown-it rules defined in https://github.com/markdown-it/markdown-it#manage-rules. let features = {};
let features = {
"bold-italics": true,
"auto-link": true,
html: true,
linkify: linkify !== false,
newline: !siteSettings.traditional_markdown_linebreaks,
};
if (state.features) { if (state.features) {
features = deepMerge(features, state.features); features = deepMerge(features, state.features);