function registerLanguage(languageName, languageDefinition) {
        let lang = null;
        try {
          lang = languageDefinition(hljs);
        } catch (error) {
          console.error("Language definition for '{}' could not be registered.".replace("{}", languageName));
          // hard or soft error
          if (!SAFE_MODE) { throw error; } else { console.error(error); }
          // languages that have serious errors are replaced with essentially a
          // "plaintext" stand-in so that the code blocks will still get normal
          // css classes applied to them - and one bad language won't break the
          // entire highlighter
          lang = PLAINTEXT_LANGUAGE;
        }
        // give it a temporary name if it doesn't have one in the meta-data
        if (!lang.name) lang.name = languageName;
        languages[languageName] = lang;
        lang.rawDefinition = languageDefinition.bind(null, hljs);

        if (lang.aliases) {
          registerAliases(lang.aliases, { languageName });
        }
      }
/**
       * Register a language grammar module
       *
       * @param {string} languageName
       * @param {LanguageFn} languageDefinition
       */
Register a language grammar module
@param {string} languageName
@param {LanguageFn} languageDefinition
Register a language grammar module @param { string } languageName @param { LanguageFn } languageDefinition
function registerLanguage(languageName, languageDefinition) {
        let lang = null;
        try {
          lang = languageDefinition(hljs);
        } catch (error) {
          console.error("Language definition for '{}' could not be registered.".replace("{}", languageName));
          if (!SAFE_MODE) { throw error; } else { console.error(error); }
          lang = PLAINTEXT_LANGUAGE;
        }
        if (!lang.name) lang.name = languageName;
        languages[languageName] = lang;
        lang.rawDefinition = languageDefinition.bind(null, hljs);
        if (lang.aliases) {
          registerAliases(lang.aliases, { languageName });
        }
      }
function registerLanguage ( languageName , languageDefinition ) { let lang = null ; try { lang = languageDefinition ( hljs ) ; } catch ( error ) { console . error ( "Language definition for '{}' could not be registered." . replace ( "{}" , languageName ) ) ; if ( ! SAFE_MODE ) { throw error ; } else { console . error ( error ) ; } lang = PLAINTEXT_LANGUAGE ; } if ( ! lang . name ) lang . name = languageName ; languages [ languageName ] = lang ; lang . rawDefinition = languageDefinition . bind ( null , hljs ) ; if ( lang . aliases ) { registerAliases ( lang . aliases , { languageName } ) ; } }
Register a language grammar module
 @param {string} languageName
 @param {LanguageFn} languageDefinition
Register a language grammar module @param { string } languageName @param { LanguageFn } languageDefinition
// hard or soft error // languages that have serious errors are replaced with essentially a // "plaintext" stand-in so that the code blocks will still get normal // css classes applied to them - and one bad language won't break the // entire highlighter // give it a temporary name if it doesn't have one in the meta-data