mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-10 09:39:38 +02:00
Update of prettier, eslint and rules
This commit is contained in:
@@ -9,11 +9,11 @@ let sections = {};
|
||||
let title = '';
|
||||
let showData = false;
|
||||
|
||||
export const parseDirective = function(statement, context, type) {
|
||||
export const parseDirective = function (statement, context, type) {
|
||||
mermaidAPI.parseDirective(this, statement, context, type);
|
||||
};
|
||||
|
||||
const addSection = function(id, value) {
|
||||
const addSection = function (id, value) {
|
||||
if (typeof sections[id] === 'undefined') {
|
||||
sections[id] = value;
|
||||
log.debug('Added new section :', id);
|
||||
@@ -21,22 +21,22 @@ const addSection = function(id, value) {
|
||||
};
|
||||
const getSections = () => sections;
|
||||
|
||||
const setTitle = function(txt) {
|
||||
const setTitle = function (txt) {
|
||||
title = txt;
|
||||
};
|
||||
|
||||
const setShowData = function(toggle) {
|
||||
const setShowData = function (toggle) {
|
||||
showData = toggle;
|
||||
};
|
||||
|
||||
const getShowData = function() {
|
||||
const getShowData = function () {
|
||||
return showData;
|
||||
};
|
||||
|
||||
const getTitle = function() {
|
||||
const getTitle = function () {
|
||||
return title;
|
||||
};
|
||||
const cleanupValue = function(value) {
|
||||
const cleanupValue = function (value) {
|
||||
if (value.substring(0, 1) === ':') {
|
||||
value = value.substring(1).trim();
|
||||
return Number(value.trim());
|
||||
@@ -45,7 +45,7 @@ const cleanupValue = function(value) {
|
||||
}
|
||||
};
|
||||
|
||||
const clear = function() {
|
||||
const clear = function () {
|
||||
sections = {};
|
||||
title = '';
|
||||
showData = false;
|
||||
@@ -64,6 +64,6 @@ export default {
|
||||
setTitle,
|
||||
getTitle,
|
||||
setShowData,
|
||||
getShowData
|
||||
getShowData,
|
||||
// parseError
|
||||
};
|
||||
|
Reference in New Issue
Block a user