Results 1 to 2 of 2
  1. #1
    Join Date
    May 2018
    Posts
    1

    Default How to ignore line breaks or line numbers?

    Hi,

    I've been searching the forums and I can't find the answer to a question. I am a novice at BC. I have two text files, here are examples:

    File 1:

    Hey, diddle, diddle,
    The cat and the fiddle,

    File 2:

    Hey, diddle, diddle, The cat and the fiddle,

    The text is identical, the only difference is that when I view "Line Numbers" the File 1 has two line numbers

    1 Hey, diddle, diddle,
    2 The cat and the fiddle,

    while File 2 has one line number:

    1 Hey, diddle, diddle, The cat and the fiddle,

    However, I would like the above to not be considered differences, but instead identical. The reason is that I may have a single "line number" that is hundreds of words long (because word wrap was enabled on the originating word processor, so a person just kept on typing and typing and their paragraph shows up as a "single" line number). The comparing text file has the identical text, except their word processor broke up the paragraph as separate lines when a line reached the right of the screen.

    I only want to compare essential differences like a missing or added characters and so forth, and I do not need to worry about line numbers. (The reason is that now I get large red "differences" in BC, but I don't know if there are any real differences.) Is there anyway to ignore line numbers?

    Thanks!

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,830

    Default

    Hello,

    Thanks for the detailed case/description. BC4 always considers line breaks important, but we have external conversions which can normalize the whitespaces of files so that the text then is moved to be in the same structure. These Tidy variants (Html, XML, etc) can be found here:
    http://www.scootersoftware.com/downl..._moreformatsv4

    Please note that if you edit/save in the re-formated form, it will be saved with this structure of line breaks. You can also edit the Tidy variant format to be Editing Disabled to prevent this (Tools menu -> File Formats, Conversion tab, edit Format).

    We also have a guide for plugging in any command line tool that can perform the normalization, here:
    http://www.scootersoftware.com/suppo...rnalconversion
    Aaron P Scooter Software

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •