Announcement

Collapse
No announcement yet.

scripts with line breaks vs minified

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

  • scripts with line breaks vs minified

    When I work with html or php that has javascript embedded, especially, if the script has been minified in one file but not the other, the minified script is on one long line (because there are no line breaks) while the non-minified code may be on multiple lines for readability. BC3 will show all of that as differences even though they are the same minus the line breaks.

    I have the same issues for some php scripting as well as css files all of which are often written with line breaks for readability during development, but then minified for production.

    I love BC3 for most things, but this really frustrates me. I keep thinking that there must be a better way! ;-)

  • #2
    BC3 does not currently support comparing over line breaks. We would need to minify both lines (even temporarily) or put the other line back as a long line. We have a few additional File Formats which do this (XML Tidied, HTML Tidied, Java Tidied, etc) which perform this format on the command line and then compare the re-formatted file.

    We can also use any custom command line, as detailed in this KB article:
    http://www.scootersoftware.com/suppo...rnalconversion

    If you perform a Save in the Text Compare, it will save in the formatted style, so please enable Disable Editing in the File Format Conversion tab to prevent that (if needed).
    Aaron P Scooter Software

    Comment

    Working...
    X