diff options
author | Phil Ruffwind <rf@rufflewind.com> | 2017-03-13 15:17:47 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-03-13 15:17:47 -0400 |
commit | c77b767098be53087e0b06ba23d613dd7c3bcf8e (patch) | |
tree | 164e70adf6123e7e8d17331483ad5eccd10478e5 /utils | |
parent | ae0ccf8c16f5ed394ab01a1863abd98a7a44ab60 (diff) | |
download | haskell-c77b767098be53087e0b06ba23d613dd7c3bcf8e.tar.gz |
unlit: replace the SHEBANG with an empty line
This corrects the line numbers for literate code after a shebang.
Fixes #13414.
Test Plan: validate
Reviewers: austin, bgamari, trofi
Reviewed By: bgamari, trofi
Subscribers: trofi, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3333
Diffstat (limited to 'utils')
-rw-r--r-- | utils/unlit/unlit.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/unlit/unlit.c b/utils/unlit/unlit.c index c0e3b983ea..9a697eba95 100644 --- a/utils/unlit/unlit.c +++ b/utils/unlit/unlit.c @@ -296,6 +296,9 @@ static void unlit(char *file, FILE *istream, FILE *ostream) } } #endif + if (this == SHEBANG) { + myputc('\n', ostream); + } } while(this!=ENDFILE); if (defnsread==0) |