Changeset ef4700c for text.c


Ignore:
Timestamp:
Apr 16, 2010, 6:04:05 PM (11 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.6, release-1.7, release-1.8, release-1.9
Children:
75b0adb
Parents:
6e58ff2
git-author:
Nelson Elhage <nelhage@mit.edu> (04/08/10 22:07:19)
git-committer:
Nelson Elhage <nelhage@mit.edu> (04/16/10 18:04:05)
Message:
Properly quote strings containing newlines or tabs.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • text.c

    rf7cd7c9 ref4700c  
    271271  if (strchr(line, '\'')) return("\"");
    272272  if (strchr(line, '"')) return("'");
    273   if (strchr(line, ' ')) return("'");
     273  if (strcspn(line, "\n\t ") != strlen(line)) return("'");
    274274  return("");
    275275}
Note: See TracChangeset for help on using the changeset viewer.