Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

drop trailing whitespace from header lines #221

Merged
merged 1 commit into from Oct 9, 2012

Conversation

Projects
None yet
3 participants
Contributor

peff commented Jun 10, 2012

Markdown will mis-parse a header line with trailing
whitespace like:

Subsection ##_

(where the "_" is substituted here to show where the
whitespace would be). This ends up as the section title:

Subsection ##

@peff peff referenced this pull request in git/git-scm.com Jun 10, 2012

Closed

some pro git URLs cause internal server error #142

Contributor

GArik commented Jun 10, 2012

Hi Peff. Your commit doesn't fix some of the header lines. For instance, the header next to one you have fixed in russian translation also suffers from the same issue: http://git-scm.com/book/ru/Основы-Git-Работа-с-удалёнными-репозиторями#Push-###
Maybe it's better to remove just all trailing spaces with something like:

for i in $(grep -rl ' $' $(ls -d ?? ??-??)); do
  sed -i 's| \+$||' "$i"
done
@peff peff drop trailing whitespace from header lines
Markdown will mis-parse a header line with trailing
whitespace like:

  ## Subsection ##_

(where the "_" is substituted here to show where the
whitespace would be). This ends up as the section title:

  Subsection ##
0791ecf
Contributor

peff commented Jun 10, 2012

Oops, you're right. I thought I found all sites by grepping for '# $', but I must have missed that one. I just pushed an updated patch.

I would be totally fine with killing off all trailing whitespace. I only hesitated to do so because there is a lot of it, and I didn't want to cause unnecessary conflicts with people who have works in progress. So why don't we leave it to the owners of each translated version to do so on their own files, whenever they have decided that development of their files is settled enough?

Contributor

GArik commented Jun 10, 2012

You are right. However most of the whitespace issues come from english version. So fixing the original content should probably be the first step :)

@jnavila jnavila added a commit that referenced this pull request Oct 9, 2012

@jnavila jnavila Merge pull request #221 from peff/trailing-whitespace
drop trailing whitespace from header lines
f90d437

@jnavila jnavila merged commit f90d437 into progit:master Oct 9, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment