#1542 Updated test

This commit is contained in:
Knut Sveidqvist
2020-07-18 13:52:51 +02:00
parent f7a6241ac0
commit e8af778962
4 changed files with 23 additions and 10 deletions

View File

@@ -519,7 +519,7 @@ function updateRendererConfigs(conf) {
}
function reinitialize(options) {
console.log(`mermaidAPI.reinitialize: v${pkg.version}`, options);
console.warn(`mermaidAPI.reinitialize: v${pkg.version}`, options);
if (options.theme && themes[options.theme]) {
// Todo merge with user options
options.themeVariables = themes[options.theme];
@@ -533,15 +533,16 @@ function reinitialize(options) {
}
function initialize(options) {
// console.log(`mermaidAPI.initialize: v${pkg.version}`);
console.log(`mermaidAPI.initialize: v${pkg.version} ${options}`);
// Set default options
if (options && options.theme && themes[options.theme]) {
// Todo merge with user options
options.themeVariables = themes[options.theme];
} else {
if (options) options.themeVariables = themes.default;
}
// else {
// if (options) options.themeVariables = themes.default;
// }
const config = typeof options === 'object' ? setSiteConfig(options) : getSiteConfig();