susanBuck / e15-spring22

0 stars 0 forks source link

Linefeed misbehavior in README #11

Closed archerdave closed 2 years ago

archerdave commented 2 years ago

In looking at my README file in GitHub, I noticed that the text By: David Harvill which I added to a new line at the end of the file, is actually showing up on the same line as the line above when it displays in Git Hub.

Here are the contents of README.md:

# e15
Coursework for CSCI E-15, Spring 2022
By: David Harvill

And here is what is showing up in the GitHub repository.

Screen Shot 2022-02-08 at 4 21 48 PM

If I add an empty line in between in the README.md, like this...

# e15
Coursework for CSCI E-15, Spring 2022

By: David Harvill

... then the new lines all show up properly, like this:

Screen Shot 2022-02-08 at 4 32 37 PM

I did verify that I set git's handling of CRLF as described in the notes:

root@hes:~/.ssh# git config --global -l
user.name=David Harvill
user.email=dharvill@gmail.com
color.ui=true
core.filemode=false
core.autocrlf=input

Any ideas what might be going on?

archerdave commented 2 years ago

And looking back at the class video part 5, at 7:14, it looks like Susan Buck's README file is displaying the same way. Maybe markdown needs an empty line to show a newline?

gkorodi commented 2 years ago

I think you are picking up on Markdown's "features" that are not so obvious. A newline "CR" or "CRLF" is NOT a <br /> in Markdown :(

This might help: https://daringfireball.net/projects/markdown/syntax#p

archerdave commented 2 years ago

Okay, so typing this out helped me think through it a bit more, and I found what I needed in the markdown syntax guide.

https://www.markdownguide.org/basic-syntax/#line-breaks