knsv/mermaid

View on GitHub
packages/mermaid/src/rendering-util/createText.ts

Summary

Maintainability
A
2 hrs
Test Coverage

Function addHtmlSpan has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function addHtmlSpan(element, node, width, classes, addBackground = false) {
  const fo = element.append('foreignObject');
  const div = fo.append('xhtml:div');

  const label = node.label;
Severity: Minor
Found in packages/mermaid/src/rendering-util/createText.ts - About 1 hr to fix

    Function createFormattedText has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function createFormattedText(
      width: number,
      g: any,
      structuredText: MarkdownWord[][],
      addBackground = false
    Severity: Minor
    Found in packages/mermaid/src/rendering-util/createText.ts - About 1 hr to fix

      Function addHtmlSpan has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function addHtmlSpan(element, node, width, classes, addBackground = false) {
      Severity: Minor
      Found in packages/mermaid/src/rendering-util/createText.ts - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status