Saturday, May 13, 2017

New line in ReadMe file Github: Fixing the blank new line break issue in ReadMe.Md files in Github

This post is aimed to fix a very simple issue - Fixing the blank new line break issue in ReadMe.Md files in Github. You can find the ReadMe.Md file which had this problem and how it was fixed in my Github repository: https://github.com/Anwar-Faiz/Simple-Java-Unicode


When editing an issue and clicking Preview the following lines in Read me file:
a
b
c
i.e. it shows every letter on a new line.

However, it seems sometimes that after pushing similar markdown source structure in README.md joins all the letters on one line.

Issue: This usually happens because of different Operating systems and text editors used.


Solution:
Interpreting newlines as
used to be a feature of Github. But recent documentations do not list this as a feature. So, you have to do it manually. But its easy!

Method 1: Introduce a __ character at end of each line. _ acts as a blank space
i.e transform:
a
b
c
as following in the ReadMe.md file:
a__
b__
c
(where ).

Method 2: Explicitly add
tags.
Eg:
a
b
c


I personally prefer method 2 for a number of reasons. For example you can see following commit of mine just to fix the same issue:
https://github.com/Anwar-Faiz/Simple-Java-Unicode/commit/85bd54531067ff4055c5e8801aba5324221d5ae3

Cheers ;)
Anwar Faiz

3 comments:

  1. Much obliged for sharing the post.. folks are universes best individual in every existences of individual..they need or should succeed to maintain needs of the crew.
    Its an extraordinary delight perusing your post.Its loaded with data I am searching for and I want to post a remark that "The substance of your post is magnificent" Great work.

    video production Dubai

    ReplyDelete