mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-12 02:29:37 +02:00
#931 Aligning code standard
This commit is contained in:
@@ -1,40 +1,40 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
import { logger } from '../../logger'
|
||||
import { logger } from '../../logger';
|
||||
|
||||
let sections = {}
|
||||
let title = ''
|
||||
let sections = {};
|
||||
let title = '';
|
||||
|
||||
const addSection = function (id, value) {
|
||||
const addSection = function(id, value) {
|
||||
if (typeof sections[id] === 'undefined') {
|
||||
sections[id] = value
|
||||
logger.debug('Added new section :', id)
|
||||
sections[id] = value;
|
||||
logger.debug('Added new section :', id);
|
||||
// console.log('Added new section:', id, value)
|
||||
}
|
||||
}
|
||||
const getSections = () => sections
|
||||
};
|
||||
const getSections = () => sections;
|
||||
|
||||
const setTitle = function (txt) {
|
||||
title = txt
|
||||
}
|
||||
const setTitle = function(txt) {
|
||||
title = txt;
|
||||
};
|
||||
|
||||
const getTitle = function () {
|
||||
return title
|
||||
}
|
||||
const cleanupValue = function (value) {
|
||||
const getTitle = function() {
|
||||
return title;
|
||||
};
|
||||
const cleanupValue = function(value) {
|
||||
if (value.substring(0, 1) === ':') {
|
||||
value = value.substring(1).trim()
|
||||
return Number(value.trim())
|
||||
value = value.substring(1).trim();
|
||||
return Number(value.trim());
|
||||
} else {
|
||||
return Number(value.trim())
|
||||
return Number(value.trim());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const clear = function () {
|
||||
sections = {}
|
||||
title = ''
|
||||
}
|
||||
const clear = function() {
|
||||
sections = {};
|
||||
title = '';
|
||||
};
|
||||
// export const parseError = (err, hash) => {
|
||||
// global.mermaidAPI.parseError(err, hash)
|
||||
// }
|
||||
@@ -47,4 +47,4 @@ export default {
|
||||
setTitle,
|
||||
getTitle
|
||||
// parseError
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user