No announcement yet.

Ignore some differences

  • Filter
  • Time
  • Show
Clear All
new posts

  • Ignore some differences

    Is possible ignore this kinda of difference?

    } else {


    } else

    2- ignore differences if inside some text like:


    ignore all difference here


    3- ignore line difference

  • #2

    Mostly, yes. First, you would define something as a Grammar element, and then you can mark the element as Important (Red) or Unimportant (Blue) when encountering a difference. Blue differences can then be ignored with the Ignore Unimportant Differences toggle.

    So a couple of your sections can already be ignored (the empty line and what is probably a Comment) by enabling the toggle.

    If you want Comments to be Important, you can make that Red, but when defining the new grammar to match on //OK will need to include enough of a definition that the Comment definition doesn't activate first and swallow it.

    We have a KB article about defining a (delimited Grammar Element of //<OK> to //</OK>) here:

    The bracket difference is not something we can easily define or ignore, since it is separated across multiple lines. You could make both sides Unimportant elements. Or you could run the code through a conversion utility that normalizes the line breaks and whitespace, so they are the same bracket structure. If editing and saving, it would save in the new structure. We have some examples for download here:
    and we have some Tidied variants for HTML, XML, etc for download here:
    Aaron P Scooter Software