mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-19 23:39:50 +02:00
#900 Handling ids starting with a number and styling for other nodes as well
This commit is contained in:
@@ -88,8 +88,13 @@ export const addVertex = function (_id, text, type, style, classes) {
|
||||
* @param type
|
||||
* @param linktext
|
||||
*/
|
||||
export const addLink = function (start, end, type, linktext) {
|
||||
export const addLink = function (_start, _end, type, linktext) {
|
||||
let start = _start
|
||||
let end = _end
|
||||
if (start[0].match(/\d/)) start = 's' + start
|
||||
if (end[0].match(/\d/)) end = 's' + end
|
||||
logger.info('Got edge...', start, end)
|
||||
|
||||
const edge = { start: start, end: end, type: undefined, text: '' }
|
||||
linktext = type.text
|
||||
|
||||
|
Reference in New Issue
Block a user