0

I've tried to follow a tutorial to add a comment for Beyond Compare but I am still unable to mark the commented lines as unimportant differences. I would like to compare R files. This is how I configured the grammar Rules.

enter image description here enter image description here

If possible I would like to ignore the commented line only if the content of the line is equal. In other words if by removing the comment the two lines would actually differ I would still like to have them marked as important differences.

Here is the actual result of the comparison. Strangely when there are two comment symbols (#) the line appear as minor difference.

enter image description here

Manfredo
  • 1,760
  • 4
  • 25
  • 53
  • I have similar setting for my ruby-scripts and it works ok. Can you post a screenshot from a comparison where you have the wrong result? – knut Nov 29 '17 at 19:35

1 Answers1

1

Beyond Compare doesn't support what you're trying to do. The comparison for each character checks both the character itself and the grammar type of the element. For example, comparing an identifier to a string will always show the characters as completely different even if the strings themselves are identical.

In your example, since they're different grammar types, every character is considered a difference. On the left they're comments, so unimportant and normally drawn as blue differences, but you're ignoring unimportant differences so they're shown as matching/black instead. On the right, they're important text, so they're drawn as red differences.

The lines that are comments on both sides are showing as matching because (A) they're all the same character and grammar type, so, aside from the # leading character, they are treated as matches, and (B) you're ignoring unimportant differences. (B) means that you could actually have anything for the content of the comments on each side and it would still show up as matching.

Zoë Peterson
  • 13,094
  • 2
  • 44
  • 64
  • Yes I see what you mean. Well since you work at Beyond Compare this could be a suggestion for a new feature.... – Manfredo Nov 29 '17 at 20:59