Dynamo icon indicating copy to clipboard operation
Dynamo copied to clipboard

Semi Colon as String in Code Block

Open vykrum opened this issue 4 years ago • 2 comments

Dynamo version

2.13.0.2857

Operating system

Windows 11

What did you do?

Tried to split a string with ";"+"\n" as separator

What did you expect to see?

Similar results as the same separator in a String node

What did you see instead?

Firstly, a single semi colon, even within double quotes, seems to indicate end of line in a Code Block node. On forcing it to accept ";"+"\n" it doesn't seem to behave properly.

stringSplitIssue

This was observed while responding to this post on the forum

vykrum avatar Oct 16 '21 08:10 vykrum

Thank you for submitting the issue to us. We are sorry to see you get stuck with your workflow. While waiting for our team member to respond, please feel free to browse our forum at https://forum.dynamobim.com/ for more Dynamo related information.

github-actions[bot] avatar Oct 16 '21 08:10 github-actions[bot]

Just adding that issue is located here https://github.com/DynamoDS/Dynamo/blob/3e2036956206d9f16126c73cbf3a612ec444da83/src/DynamoCore/Graph/Nodes/CodeBlockUtils.cs#L211

Where the code does not check if the semicolon is inside a string, comment or multiline comment image

Perhaps an additional switch for semicolon here? https://github.com/DynamoDS/Dynamo/blob/3e2036956206d9f16126c73cbf3a612ec444da83/src/DynamoCore/Graph/Nodes/CodeBlockUtils.cs#L536

tinrobot2000 avatar Nov 22 '24 07:11 tinrobot2000