Bug 13212 – Trailing Windows line endings not stripped from .ddoc macros

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2014-07-27T08:44:00Z
Last change time
2015-06-09T01:31:22Z
Keywords
pull
Assigned to
nobody
Creator
alix.pexton

Comments

Comment #0 by alix.pexton — 2014-07-27T08:44:07Z
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 by nick — 2014-08-10T10:46:06Z
Important note: This is only reproducible when the macros are in a separate .ddoc file.
Comment #2 by github-bugzilla — 2014-08-11T17:19:29Z
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