You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
letstr=`# leading commentvalue1: # inline comment sub: 1 # sub inline comment# trailing comment`;letyawn=newYAWN(str);console.log("value1 remark:",yawn.getRemark('value1'));console.log("value1.sub remark:",yawn.getRemark('value1.sub'));yawn.setRemark('value1',"value1 new remark");console.log("value1 remark:",yawn.getRemark('value1'));console.log("value1.sub remark:",yawn.getRemark('value1.sub'));
Output:
value1 remark: sub inline comment
value1.sub remark: sub inline comment
value1 remark: value1 new remark
value1.sub remark: value1 new remark
The expected behavior would be that the returned value for value1's remark is inline comment, however, we get the remark of its child. This same issue means that any modifications to value1's remark modify its child, which you can see with the second set of print statements
The text was updated successfully, but these errors were encountered:
Output:
The expected behavior would be that the returned value for
value1
's remark isinline comment
, however, we get the remark of its child. This same issue means that any modifications tovalue1
's remark modify its child, which you can see with the second set of print statementsThe text was updated successfully, but these errors were encountered: