Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's the usual markdown/reST/et al approach of strip newlines unless they are doubled up at a "paragraph" boundary.

When converting to/from Inform 7 where newlines are sometimes syntactically important, but I want to version control it (and sometimes write/edit it) a bit more "semantic newline", or at least "72-character wrapped", I have a tool converting "hard" newlines to/from Pilcrows [0] (ΒΆ). Which I think look reasonable in source document form and is an appropriate mark for the meaning (denoting a new paragraph).

An example: https://github.com/WorldMaker/APrincessOfMoons/blob/master/_...

The bones of my converter: https://github.com/WorldMaker/APrincessOfMoons/blob/master/i...

[0] https://en.wikipedia.org/wiki/Pilcrow



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: