From c5f570e3917448cac3baa3923aa0c5f4d8da32ea Mon Sep 17 00:00:00 2001 From: yanglbme Date: Tue, 28 Jul 2020 20:51:27 +0800 Subject: [PATCH] style: remove code theme option --- src/assets/scripts/renderers/wx-renderer.js | 36 +++++---------------- src/components/CodemirrorEditor/header.vue | 10 ------ 2 files changed, 8 insertions(+), 38 deletions(-) diff --git a/src/assets/scripts/renderers/wx-renderer.js b/src/assets/scripts/renderers/wx-renderer.js index 337a982..48edc29 100644 --- a/src/assets/scripts/renderers/wx-renderer.js +++ b/src/assets/scripts/renderers/wx-renderer.js @@ -137,34 +137,14 @@ const WxRenderer = function (opts) { numbers.push('
  • ') } const lang = infoString || ''; - const codeTheme = store.state.codeTheme; - let result; - - switch (codeTheme) { - case 'wechat': - result = ` -
    - -
    -                                ${codeLines.join('')}
    -                            
    -
    - `; - break; - case 'github': - result = ` -
    -
    -                                ${codeLines.join('')}
    -                            
    -
    - `; - break; - default: - break; - } - - return result; + const codeTheme = 'github'; + return ` +
    +
    +                        ${codeLines.join('')}
    +                    
    +
    + `; } renderer.codespan = (text, infoString) => `${text}` renderer.listitem = text => `<%s/>${text}` diff --git a/src/components/CodemirrorEditor/header.vue b/src/components/CodemirrorEditor/header.vue index fd979f2..40688d7 100644 --- a/src/components/CodemirrorEditor/header.vue +++ b/src/components/CodemirrorEditor/header.vue @@ -47,16 +47,6 @@ - - - - {{ theme.label }} - {{ theme.desc }} - - -