Fix for measure dependencies parsing
This commit is contained in:
parent
6f16e97c1c
commit
624e5be5ea
Binary file not shown.
Binary file not shown.
@ -75,12 +75,14 @@ namespace BismNormalizer.TabularCompare.TabularMetadata
|
|||||||
//Todo2: still need to parse for /* blah */ type comments. Currently can show missing dependency that doesn't apply if within a comment
|
//Todo2: still need to parse for /* blah */ type comments. Currently can show missing dependency that doesn't apply if within a comment
|
||||||
|
|
||||||
string whatsRemainingOfLine = line;
|
string whatsRemainingOfLine = line;
|
||||||
|
int openSquareBracketPosition = 0;
|
||||||
|
int closeSquareBracketPosition = 0;
|
||||||
|
|
||||||
while (whatsRemainingOfLine.Contains('[') && whatsRemainingOfLine.Contains(']'))
|
while (whatsRemainingOfLine.Contains('[') && whatsRemainingOfLine.Contains(']') && openSquareBracketPosition != -1 && closeSquareBracketPosition != -1)
|
||||||
{
|
{
|
||||||
int openSquareBracketPosition = whatsRemainingOfLine.IndexOf('[', 0);
|
openSquareBracketPosition = whatsRemainingOfLine.IndexOf('[', 0);
|
||||||
//someone has ]] instead of ]
|
//someone has ]] instead of ]
|
||||||
int closeSquareBracketPosition = whatsRemainingOfLine.Replace("]]", " ").IndexOf(']', openSquareBracketPosition + 1);
|
closeSquareBracketPosition = whatsRemainingOfLine.Replace("]]", " ").IndexOf(']', openSquareBracketPosition + 1);
|
||||||
|
|
||||||
if (openSquareBracketPosition < closeSquareBracketPosition - 1)
|
if (openSquareBracketPosition < closeSquareBracketPosition - 1)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user