Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError Cannot read properties of null (reading 're') #6060

Open
jagadeesh-r1 opened this issue Nov 14, 2024 · 1 comment
Open

TypeError Cannot read properties of null (reading 're') #6060

jagadeesh-r1 opened this issue Nov 14, 2024 · 1 comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@jagadeesh-r1
Copy link

Description

I'm trying to generate svg from the graph given below

 %%{init: {"flowchart": {"defaultRenderer": "elk"}} }%%
 flowchart TB;
  A["<p>glucagon-like peptide-1 (GLP-1) receptor agonist added to continued metformin + continued cardiovascular
 risk reduction/lifestyle measures
 <br>
    <span style='font-size:70%;text-align:left;'>     treatment type: <br>
    treatment line: 1<br>
    sequence: 12<span><p>"]
       subgraph bmj:actionList_3cRW1LOcpHPPs30QLinmo2[all]
        bmj:actionList_4ovQYqfAbVlVEKFOzcb89q["GLUCAGON-LIKE PEPTIDE-1 (GLP-1) RECEPTOR AGONIST<span
 style='font-size:90%;text-align:left;'>= 416171004&nbsp;&nbsp;</span>"]

          bmj:actionList_3XkKyUXDeistqn3yXoSlJI["METFORMIN<span style='font-size:90%;text-align:left;'>=
 372567009&nbsp;&nbsp;</span>"]

          bmj:actionList_9GWiaRROwnPGxylT3jKcl["CARDIOVASCULAR RISK REDUCTION<span style='font
size:90%;text-align:left;'>^ 827181004&nbsp;&nbsp;</span>"]

          bmj:actionList_5G0BcN9LzEbJ2nzTrSYIkk["LIFESTYLE MEASURES<span style='font-size:90%;text
align:left;'>^ 313204009&nbsp;&nbsp;</span>"]

         end
       A -- actionClass --> bmj:actionList_3cRW1LOcpHPPs30QLinmo2
       subgraph action[exactly-one]
            subgraph actionx1["<p style='font-size:70%;text-align:left;'>selection: all </p>"]
        direction LR
             subgraph actionx1comp[all]
     subgraph actionx1comp1[exactly-one]
   end
      subgraph actionx1comp2[exactly-one]
    bmj:treatmentComponent_2g9BOkmbShfJrrIcrLmHIt["metformin<span style='font-size:90%;text-align:left;'>=
 372567009&nbsp;&nbsp;</span>"]
           bmj:actionList_3cRW1LOcpHPPs30QLinmo2-- hasClassMember --- bmj:treatmentComponent_
 2g9BOkmbShfJrrIcrLmHIt

      bmj:treatmentComponent_T5ha3mcioElb0ZKZUj3pf["liraglutide<span style='font-size:90%;text-align:left;'>=
 444828003&nbsp;&nbsp;</span>"]
           bmj:actionList_4ovQYqfAbVlVEKFOzcb89q-- hasClassMember --- bmj:treatmentComponent_
 T5ha3mcioElb0ZKZUj3pf

      bmj:treatmentComponent_2U0iqCKrVIwfeSVVuiaEmc["dulaglutide<span style='font-size:90%;text-align:left;'>=
 714080005&nbsp;&nbsp;</span>"]
           bmj:actionList_4ovQYqfAbVlVEKFOzcb89q-- hasClassMember --- bmj:treatmentComponent_
 2U0iqCKrVIwfeSVVuiaEmc

      bmj:treatmentComponent_1F1O3hkN2pyN1VRi7XA7gB["semaglutide<span style='font-size:90%;text
align:left;'>= 764283003&nbsp;&nbsp;</span>"]
           bmj:actionList_4ovQYqfAbVlVEKFOzcb89q-- hasClassMember --- bmj:treatmentComponent_
 1F1O3hkN2pyN1VRi7XA7gB

      bmj:treatmentComponent_YR3m4gyl9OSU76BGkvX68["exenatide<span style='font-size:90%;text-align:left;'>=
 416859008&nbsp;&nbsp;</span>"]
           bmj:actionList_4ovQYqfAbVlVEKFOzcb89q-- hasClassMember --- bmj:treatmentComponent_
 YR3m4gyl9OSU76BGkvX68

      bmj:treatmentComponent_6XywOSd7dwZ3Q3zIEvXuer["lixisenatide<span style='font-size:90%;text
align:left;'>= 708808004&nbsp;&nbsp;</span>"]
           bmj:actionList_4ovQYqfAbVlVEKFOzcb89q-- hasClassMember --- bmj:treatmentComponent_
 6XywOSd7dwZ3Q3zIEvXuer

     end
  end
   end
         end

       subgraph indication[or ]
          direction TB
                 subgraph bmj:factorList_7Xv5A5J2oIjzwGACTeLefj[or ]
             direction LR
                      bmj:factorList_3zpg9byNZoYtAsVm7zcM91["
 established atherosclerotic cardiovascular disease
 <span style='color:green'  class='fa-solid fa-check'></span> 
established atherosclerotic cardiovascular disease
 &nbsp;<span style='font-size:90%;text-align:left;'>= 28960008&nbsp;&nbsp;</span>"]     

 
 
 
 
 
                      bmj:factorList_48qQC1LQbJen4RXiI4nCSQ["
 indicators of high cardiovascular risk
 <span style='color:green'  class='fa-solid fa-check'></span> 
indicators of high cardiovascular risk
 &nbsp;<span style='font-size:90%;text-align:left;'>^ 16434071000119108&nbsp;&nbsp;</span>"]     

 
 
 
 
 
                      bmj:factorList_6f4LWvnNvfRi9U7WLm5tm1["
 established kidney disease
 <span style='color:green'  class='fa-solid fa-check'></span> 
established kidney disease
 &nbsp;<span style='font-size:90%;text-align:left;'>= 90708001&nbsp;&nbsp;</span>"]     

 
 
 
 
 
                      bmj:factorList_4oPTA0cenASdvnMNEONp6e["
 heart failure
 <span style='color:green'  class='fa-solid fa-check'></span> 
heart failure
 &nbsp;<span style='font-size:90%;text-align:left;'>= 84114007&nbsp;&nbsp;</span>"]     

 
 
 
 
 
          end
                 subgraph bmj:factorList_5OtJ4dGE5HlJ9qqjZtUBeC[and ]
             direction LR
                       subgraph bmj:factorList_5vUvHv6qIcBJeUb8sYzh0M[and ]
                direction TB
                             subgraph bmj:factorList_3EZT1kR2f1SdRE1K4VN7JQ[and ]
                   direction LR
                                   subgraph bmj:factorList_1VtttHEiLpSdKbFJ1cdEeJ[and ]
                      direction TB
                                        bmj:factorList_swWX7Gpi3gE3zkMMDBmNI["
 marked hyperglycemia
 <span style='color:red' class='fa-solid fa-xmark'></span> 
marked hyperglycemia
 &nbsp;<span style='font-size:90%;text-align:left;'>= 80394007&nbsp;&nbsp;</span>"]     

 
 
 
 
 
                                        bmj:factorList_VD4V2NuHQdFtPFirdb8ev["
 pregnant
 <span style='color:red' class='fa-solid fa-xmark'></span> 
pregnant
 &nbsp;<span style='font-size:90%;text-align:left;'>= 255409004&nbsp;&nbsp;</span>"]     

 
 
 
 
 
                                        bmj:factorList_30hxGABMryANYrD9H6p6z5["
 asymptomatic
 <span style='color:green'  class='fa-solid fa-check'></span> 
asymptomatic
 &nbsp;<span style='font-size:90%;text-align:left;'>= 84387000&nbsp;&nbsp;</span>"]     

 
 
 
 
 
                        

 
 
 
 
 
                        

 
 
 
 
 
                   end
                                   subgraph bmj:factorList_4ySk9t01lLtcz83BE36LTo[or ]
                      direction TB
                                        bmj:factorList_2uD2qOE26fG84Updat5EAk["
 serum glucose level
 <span style='color:green'  class='fa-solid fa-check'></span> 
serum glucose level
 &nbsp;<span style='font-size:90%;text-align:left;'>^ 166922008&nbsp;&nbsp;</span>"]     

 
 
 
 
 
                                        bmj:factorList_3627dDcNs1G7HhFVIddYEI["
 Haemoglobin A1c level
 <span style='color:green'  class='fa-solid fa-check'></span> 
Haemoglobin A1c level
 &nbsp;<span style='font-size:90%;text-align:left;'>^ 444751005&nbsp;&nbsp;</span>"]     

 
 
 
 
 
                        

 
 
 
 
 
                        

 
 
 
 
 
                   end
                     

 
 
 
 
 
                end
                            bmj:factor_1T85RpGpWMh4n8ZjcxUqni["
 HbA1c above goal on metformin
 <span style='color:green'  class='fa-solid fa-check'></span> 
HbA1c above goal on metformin
 &nbsp;<span style='font-size:90%;text-align:left;'>^ 444751005&nbsp;&nbsp;</span>"]     

 
 
 
 
 
             end
                       subgraph bmj:factorList_38glRxZ2ZhOLrHQDPmzR5i[and ]
                direction TB
                            bmj:factorList_6oGMmxJFRPKQ7bxAfz6Tyr["
 Type 2 diabetes mellitus
 <span style='color:green'  class='fa-solid fa-check'></span> 
Type 2 diabetes mellitus
 &nbsp;<span style='font-size:90%;text-align:left;'>= 44054006&nbsp;&nbsp;</span>"]     

 
 
 
 
 
                            bmj:factorList_2Db37EI2KLZGqreVs7KFET["
 adult
 <span style='color:green'  class='fa-solid fa-check'></span> 
adult
 &nbsp;<span style='font-size:90%;text-align:left;'>= 133936004&nbsp;&nbsp;</span>"]     

 
 
 
 
 
             end
          end
       end
  indication ---> |has treatment option| A 
  classDef detailsClass font-size:10pt,text-align:left;

Steps to reproduce

env details:
installed mermaid through

npm install -g @mermaid-js/mermaid-cli

node : v16.20.2

  1. save the graph in a txt file.
  2. run the command
mmdc -i txt_file -o svg_file

Screenshots

mermaid

Code Sample

No response

Setup

  • Mermaid version: 20.18.0
  • Browser and Version: [Chrome, Edge, Firefox]

Suggested Solutions

No response

Additional Context

No response

@jagadeesh-r1 jagadeesh-r1 added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Nov 14, 2024
@jagadeesh-r1
Copy link
Author

But i'm able to get svg from online live mermaid editors without any errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

No branches or pull requests

1 participant