mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-20 07:49:43 +02:00
Replace 'var ' with 'const '
This commit is contained in:
@@ -8,13 +8,11 @@ describe('when parsing an info graph it', function () {
|
||||
})
|
||||
|
||||
it('should handle an info definition', function () {
|
||||
var str = 'info\nsay: hello'
|
||||
|
||||
const str = 'info\nsay: hello'
|
||||
parser.parse(str)
|
||||
})
|
||||
it('should handle an showMessage statement definition', function () {
|
||||
var str = 'info\nshowInfo'
|
||||
|
||||
const str = 'info\nshowInfo'
|
||||
parser.parse(str)
|
||||
})
|
||||
})
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { logger } from '../../logger'
|
||||
|
||||
var message = ''
|
||||
var info = false
|
||||
let message = ''
|
||||
let info = false
|
||||
|
||||
export const setMessage = function (txt) {
|
||||
logger.debug('Setting message to: ' + txt)
|
||||
|
@@ -10,17 +10,16 @@ import { logger } from '../../logger'
|
||||
* @param id
|
||||
*/
|
||||
export const draw = function (txt, id, ver) {
|
||||
var parser
|
||||
parser = exampleParser.parser
|
||||
const parser = exampleParser.parser
|
||||
parser.yy = db
|
||||
logger.debug('Renering example diagram')
|
||||
// Parse the graph definition
|
||||
parser.parse(txt)
|
||||
|
||||
// Fetch the default direction, use TD if none was found
|
||||
var svg = d3.select('#' + id)
|
||||
const svg = d3.select('#' + id)
|
||||
|
||||
var g = svg.append('g')
|
||||
const g = svg.append('g')
|
||||
|
||||
g.append('text') // text label for the x axis
|
||||
.attr('x', 100)
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user