D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 13212 - Trailing Windows line endings not stripped from .ddoc macros
Summary: Trailing Windows line endings not stripped from .ddoc macros
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Windows
: P1 minor
Assignee: No Owner
URL: https://github.com/D-Programming-Lang...
Keywords: pull
Depends on:
Blocks:
 
Reported: 2014-07-27 08:44 UTC by Alix Pexton
Modified: 2015-06-09 01:31 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Alix Pexton 2014-07-27 08:44:07 UTC
In a file with windows line endings (CR; + LF;) a macro declaration that is followed by a blank line will have a line ending included in its expansion. Saving the file with single-char line endings "fixes" the expansion, as does removing blank lines between/after macro declarations.
Comment 1 Nick Treleaven 2014-08-10 10:46:06 UTC
Important note: This is only reproducible when the macros are in a separate .ddoc file.
Comment 2 github-bugzilla 2014-08-11 17:19:29 UTC
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/35735aaf062e4f11c0d6418169e0d72422d34673
Fix Issue 13212 - Windows line endings handled incorrectly by ddoc macros

Handle \r as \n in macro definitions to prevent a trailing carriage
return on a macro with an empty line following it.

https://github.com/D-Programming-Language/dmd/commit/a3a1ef0bf134b00e37875cff2508510a82974530
Merge pull request #3829 from ntrel/macro-cr

Fix Issue 13212 - Trailing Windows line endings not stripped from .ddoc macros