Skip to content
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

An empty line at first has been ignored with HTML formatter #818

Closed
Anteru opened this issue Aug 31, 2019 · 3 comments
Closed

An empty line at first has been ignored with HTML formatter #818

Anteru opened this issue Aug 31, 2019 · 3 comments
Labels
good first issue Good for newcomers T-bug type: a bug X-imported imported from Bitbucket

Comments

@Anteru
Copy link
Collaborator

Anteru commented Aug 31, 2019

(Original issue 1111 created by tk0miya on 2015-05-17T06:17:31.490059+00:00)

With HTML formatter, an empty line at first has been ignored.
I got the problem when using -O stripnl=False option.

Maybe, it comes from that browsers ignore return code following <pre> tag.

@Anteru Anteru added T-bug type: a bug X-imported imported from Bitbucket trivial labels Aug 31, 2019
@Anteru
Copy link
Collaborator Author

Anteru commented Aug 31, 2019

(Original comment by coldfix on 2015-05-27T17:34:28.529344+00:00)

Hey, I just wanted to add: this is especially irritating when used with line numbers. The line numbers then appear shifted with regard to the actual code.
This almost always occurs when using linenostep > 1 with linenostart > 1. It can be fixed by inserting an additional space in the first line. Maybe there is another character that is better suited for this purpose.

EDIT: Probably better to use an "empty-line" span like <span class="el"></span>

@Anteru
Copy link
Collaborator Author

Anteru commented Aug 31, 2019

(Original comment by tshatch on 2015-11-01T00:14:37.073427+00:00)

Indeed, an empty span is probably the least bad here. There's a rule in http://www.w3.org/TR/html4/appendix/notes.html#h-B.3.1 that specifies that the (first) newline should get eaten.

@Anteru
Copy link
Collaborator Author

Anteru commented Aug 31, 2019

(Original comment by birkenfeld on 2016-02-02T11:53:19.209137+00:00)

Fixed HTML formatter output with leading empty lines (closes #1111)

→ <<cset 164574c13533>>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers T-bug type: a bug X-imported imported from Bitbucket
Projects
None yet
Development

No branches or pull requests

2 participants