From c56212a7f7bdcd048c33f858db56aa915c7896a0 Mon Sep 17 00:00:00 2001 From: Itai Braude Date: Tue, 22 Oct 2019 00:45:47 +0300 Subject: [PATCH 1/2] added more admonition styles --- browser/components/markdown.styl | 5 ++++- browser/lib/markdown.js | 2 +- webpack-production.config.js | 6 +++++- webpack-skeleton.js | 1 + 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/browser/components/markdown.styl b/browser/components/markdown.styl index 4921b531d..61829bc42 100644 --- a/browser/components/markdown.styl +++ b/browser/components/markdown.styl @@ -363,7 +363,10 @@ admonition_types = { danger: {color: #c2185b, icon: "block"}, caution: {color: #ffa726, icon: "warning"}, error: {color: #d32f2f, icon: "error_outline"}, - attention: {color: #455a64, icon: "priority_high"} + question: {color: #64dd17, icon: "help_outline"}, + quote: {color: #9e9e9e, icon: "format_quote"}, + abstract: {color: #00b0ff, icon: "subject"}, + attention: {color: #455a64, icon: "priority_high"}, } for name, val in admonition_types diff --git a/browser/lib/markdown.js b/browser/lib/markdown.js index 57f981db2..4174deaed 100644 --- a/browser/lib/markdown.js +++ b/browser/lib/markdown.js @@ -124,7 +124,7 @@ class Markdown { slugify: require('./slugify') }) this.md.use(require('markdown-it-kbd')) - this.md.use(require('markdown-it-admonition'), {types: ['note', 'hint', 'attention', 'caution', 'danger', 'error']}) + this.md.use(require('markdown-it-admonition'), {types: ['note', 'hint', 'attention', 'caution', 'danger', 'error', 'quote', 'abstract', 'question']}) this.md.use(require('markdown-it-abbr')) this.md.use(require('markdown-it-sub')) this.md.use(require('markdown-it-sup')) diff --git a/webpack-production.config.js b/webpack-production.config.js index bcfb2a429..263d9a836 100644 --- a/webpack-production.config.js +++ b/webpack-production.config.js @@ -6,9 +6,13 @@ const NodeTargetPlugin = require('webpack/lib/node/NodeTargetPlugin') var config = Object.assign({}, skeleton, { module: { loaders: [ + { + test: /pdf(\.worker)?(\.min)?\.js\.map$/, + loader: 'raw-loader' + }, { test: /(\.js|\.jsx)?$/, - exclude: /(node_modules|bower_components)/, + exclude: [/(node_modules|bower_components)/, /pdf(\.worker)?(\.min)?\.js\.map$/], loader: 'babel' }, { diff --git a/webpack-skeleton.js b/webpack-skeleton.js index e4cc20fea..b0bc36081 100644 --- a/webpack-skeleton.js +++ b/webpack-skeleton.js @@ -30,6 +30,7 @@ var config = { ] }, externals: [ + 'pdf-js', 'prettier', 'node-ipc', 'electron', From 2b18dcbaf706bdfb6b2e7ee14c51eba14cec07d1 Mon Sep 17 00:00:00 2001 From: Itai Braude Date: Tue, 22 Oct 2019 01:03:52 +0300 Subject: [PATCH 2/2] changed webpack config back to original --- webpack-production.config.js | 6 +----- webpack-skeleton.js | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/webpack-production.config.js b/webpack-production.config.js index 263d9a836..bcfb2a429 100644 --- a/webpack-production.config.js +++ b/webpack-production.config.js @@ -6,13 +6,9 @@ const NodeTargetPlugin = require('webpack/lib/node/NodeTargetPlugin') var config = Object.assign({}, skeleton, { module: { loaders: [ - { - test: /pdf(\.worker)?(\.min)?\.js\.map$/, - loader: 'raw-loader' - }, { test: /(\.js|\.jsx)?$/, - exclude: [/(node_modules|bower_components)/, /pdf(\.worker)?(\.min)?\.js\.map$/], + exclude: /(node_modules|bower_components)/, loader: 'babel' }, { diff --git a/webpack-skeleton.js b/webpack-skeleton.js index b0bc36081..e4cc20fea 100644 --- a/webpack-skeleton.js +++ b/webpack-skeleton.js @@ -30,7 +30,6 @@ var config = { ] }, externals: [ - 'pdf-js', 'prettier', 'node-ipc', 'electron',