I have a string in Java:
String str = "first line\nsecond line";
This string is fed to a field which reads the daringfireball markdown. \n is not recognized so I use
String str = "first line<br/>second line";
However this html markup is quite unnecessary in the other output formats that I use for this string.
=> Is there a way I can can get a line break in markdown without including <br/>
in my java string?
[background: through the API of this website I feed a string to the description field of a resource which accepts markdown, here: http://datahub.io/dataset/testapi/resource/6ad9aaba-cb47-45ff-98ed-c92ead0a1c35. As you can see there are neat line breaks between image.agent, image.date, etc. I obtain them by putting some <br/>
markup, but I find that it defeats the purpose of makrdown.]
` rather than ``. Also, you haven't given enough information to know what you're *doing* with this string value. – Jon Skeet Jan 24 '13 at 15:10