Skip to content

Space missing when opening tag at end of a line #329

Closed
@yapper-git

Description

@yapper-git

I use Tidy in a project, but I got a bug.
Below is a minimal input code example.

<p>This a minimal example for<strong>
TidyTidyTidyTidyTidyTidyTidyTidyTidy</strong> is another nice open source tool :)</p>

The problem is that a line ends with <strong>, but the white space (here newline) is in the `\n'.

All browsers displays a space between for and TidyTidyTidyTidyTidyTidyTidyTidyTidy (thanks to the newline).
While if you convert this HTML file with tidy (with default configuration).
Tidy outputs :

<!DOCTYPE html>
<html>
<head>
<meta name="generator" content=
"HTML Tidy for HTML5 for Linux version 5.1.25">
<title></title>
</head>
<body>
<p>This a minimal example
for<strong>TidyTidyTidyTidyTidyTidyTidyTidyTidy</strong> is another
nice open source tool :)</p>
</body>
</html>

The whitespace disappeared...

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions