mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-17 22:39:56 +02:00
fix gantt chart cli configuration broken #430; remove json quote around function in the config e.g. axisFormatter
This commit is contained in:
@@ -40,13 +40,12 @@ var options = {
|
|||||||
, png: system.args[2] === 'true' ? true : false
|
, png: system.args[2] === 'true' ? true : false
|
||||||
, svg: system.args[3] === 'true' ? true : false
|
, svg: system.args[3] === 'true' ? true : false
|
||||||
, css: fs.read(system.args[4])
|
, css: fs.read(system.args[4])
|
||||||
, sequenceConfig: system.args[5] !== 'null' ? JSON.parse(fs.read(system.args[5])) : '{}'
|
, sequenceConfig: system.args[5] !== 'null' ? JSON.parse(fs.read(system.args[5])) : {}
|
||||||
, ganttConfig: system.args[6] !== 'null' ? JSON.parse(fs.read(system.args[6])) : '{}'
|
, ganttConfig: system.args[6] !== 'null' ? JSON.parse(fs.read(system.args[6])) : {}
|
||||||
, verbose: system.args[7] === 'true' ? true : false
|
, verbose: system.args[7] === 'true' ? true : false
|
||||||
, width: width
|
, width: width
|
||||||
}
|
}
|
||||||
, log = logger(options.verbose)
|
, log = logger(options.verbose)
|
||||||
|
|
||||||
options.sequenceConfig.useMaxWidth = false;
|
options.sequenceConfig.useMaxWidth = false;
|
||||||
|
|
||||||
page.content = [
|
page.content = [
|
||||||
@@ -212,7 +211,7 @@ function executeInPage(data) {
|
|||||||
var xmlSerializer = new XMLSerializer()
|
var xmlSerializer = new XMLSerializer()
|
||||||
, contents = data.contents
|
, contents = data.contents
|
||||||
, sequenceConfig = JSON.stringify(data.sequenceConfig)
|
, sequenceConfig = JSON.stringify(data.sequenceConfig)
|
||||||
, ganttConfig = data.ganttConfig
|
, ganttConfig = JSON.stringify(data.ganttConfig).replace(/"(function.*)}"/, "$1")
|
||||||
, toRemove
|
, toRemove
|
||||||
, el
|
, el
|
||||||
, elContent
|
, elContent
|
||||||
|
Reference in New Issue
Block a user