-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
separate sentences onto individual lines #6
Comments
this is a bad idea for markdown |
I know this is closed, but I'm curious why "one sentence per line" is a bad idea for markdown. This is the approach I take with LaTeX and markdown documents (precisely for diffing and better version control), but I wonder if there's some precipice that I'm unknowingly approaching (at least in markdown) by doing this. As far as I know, separating sentences on individual lines should be safe in markdown, but I did a bit of googling around to see if there was something obvious I was missing. I came across this site, which seems dedicated to advocating for "semantic line breaks" and it lists Markdown as a language which supports semantic line breaks. I reviewed the Markdown syntax guide, and its treatment of paragraphs and line breaks suggests to me that things will only get messy if you end a line with two or more spaces, in which case it will be treated like a line break; otherwise consecutive lines of text will be rendered like a paragraph, no matter how many lines the content spans. However, experiments in this "issues" editor suggest that github flavored markdown is a bit more aggressive, and preserves all the line breaks, and perhaps whatever you're using to render the book is behaving more like this. If you change your mind, I use this approach in emacs to do semi-automated conversion of documents, typically when I've inherited them from someone else. |
I said that it's a "bad idea" because the bookdown/pandoc workflow resulted
in broken paragraphs (at least in the latex version) when I did this -
thanks for the further context on what might have caused this. my guess is
that it was due to spaces at the end of my lines, but at this point it's
just not worth the effort to back and fix it.
…On Wed, Nov 21, 2018 at 3:14 PM Dan Kessler ***@***.***> wrote:
I know this is closed, but I'm curious why "one sentence per line" is a
bad idea for markdown. This is the approach I take with LaTeX and markdown
documents (precisely for diffing and better version control), but I wonder
if there's some precipice that I'm unknowingly approaching (at least in
markdown) by doing this.
As far as I know, separating sentences on individual lines should be safe
in markdown, but I did a bit of googling around to see if there was
something obvious I was missing. I came across this site
<http://sembr.org/>, which seems dedicated to advocating for "semantic
line breaks" and it lists Markdown as a language which supports semantic
line breaks. I reviewed the Markdown syntax guide, and its treatment of paragraphs
and line breaks <https://daringfireball.net/projects/markdown/syntax#p>
suggests to me that things will only get messy if you end a line with two
or more spaces, in which case it will be treated like a line break;
otherwise consecutive lines of text will be rendered like a paragraph, no
matter how many lines the content spans. However, experiments in this
"issues" editor suggest that github flavored markdown is a bit more
aggressive, and preserves *all* the line breaks, and perhaps whatever
you're using to render the book is behaving more like this.
If you change your mind, I use this approach
<http://www.cs.au.dk/~abizjak/emacs/2016/03/06/latex-fill-paragraph.html>
in emacs to do semi-automated conversion of documents, typically when I've
inherited them from someone else.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA1KkLEF50pP0mdsZ_Z_8FKvxajBthIfks5uxd5WgaJpZM4XECrn>
.
--
Russell A. Poldrack
Albert Ray Lang Professor of Psychology
Professor (by courtesy) of Computer Science
Bldg. 420, Jordan Hall
Stanford University
Stanford, CA 94305
poldrack@stanford.edu
http://www.poldracklab.org/
|
would be useful to separate sentences to individual lines for purposes of diffing
The text was updated successfully, but these errors were encountered: