Announcement

Collapse
No announcement yet.

Ignore some differences

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ignore some differences

    Is possible ignore this kinda of difference?

    1-
    } else {

    and

    } else
    {

    2- ignore differences if inside some text like:

    //<OK>

    ignore all difference here

    //</OK>

    3- ignore line difference

  • #2
    Hello,

    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:
    http://www.scootersoftware.com/suppo..._unimportantv3

    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:
    http://www.scootersoftware.com/suppo...rnalconversion
    and we have some Tidied variants for HTML, XML, etc for download here:
    http://www.scootersoftware.com/downl..._moreformatsv4
    Aaron P Scooter Software

    Comment

    Working...
    X