Просмотр исходного кода

abolish isEnabledLinebreaks isEnabledLinebreaksInComments

mizozobu 6 лет назад
Родитель
Сommit
a89abe50f8
2 измененных файлов с 0 добавлено и 30 удалено
  1. 0 19
      src/server/models/config.js
  2. 0 11
      src/server/util/swigFunctions.js

+ 0 - 19
src/server/models/config.js

@@ -141,16 +141,6 @@ module.exports = function(crowi) {
     };
   }
 
-  function getValueForMarkdownNS(config, key) {
-    crowi.configManager.getConfig('markdown', key);
-    // // return the default value if undefined
-    // if (undefined === config.markdown || undefined === config.markdown[key]) {
-    //   return getDefaultMarkdownConfigs()[key];
-    // }
-
-    // return config.markdown[key];
-  }
-
   /**
    * It is deprecated to use this for anything other than AppService#isDBInitialized.
    */
@@ -304,15 +294,6 @@ module.exports = function(crowi) {
     return SECURITY_RESTRICT_GUEST_MODE_READONLY === restrictGuestMode;
   };
 
-  configSchema.statics.isEnabledLinebreaks = function(config) {
-    const key = 'markdown:isEnabledLinebreaks';
-    return getValueForMarkdownNS(config, key);
-  };
-
-  configSchema.statics.isEnabledLinebreaksInComments = function(config) {
-    const key = 'markdown:isEnabledLinebreaksInComments';
-    return getValueForMarkdownNS(config, key);
-  };
   configSchema.statics.isPublicWikiOnly = function(config) {
     const publicWikiOnly = process.env.PUBLIC_WIKI_ONLY;
     if (publicWikiOnly === 'true' || publicWikiOnly === 1) {

+ 0 - 11
src/server/util/swigFunctions.js

@@ -155,17 +155,6 @@ module.exports = function(crowi, app, req, locals) {
     return process.env.HACKMD_URI != null;
   };
 
-  locals.isEnabledLinebreaks = function() {
-    const config = crowi.getConfig();
-    return Config.isEnabledLinebreaks(config);
-  };
-
-  locals.isEnabledLinebreaksInComments = function() {
-    const config = crowi.getConfig();
-    return Config.isEnabledLinebreaksInComments(config);
-  };
-
-
   locals.customCss = function() {
     const customizeService = crowi.customizeService;
     return customizeService.getCustomCss();