Skip to content

--css-prefix option no longer adds a hyphen to its built classes #777

@petdance

Description

@petdance

Given this file:

<h1>example</h1>
Here's some <font color="#0000FF">blue</font>
And here's some <font color="RED">red<font>
<p></P>

The behavior of assigning classes in 5.7.17 is not the same as in 5.6.0. I don't know if this is a bug or intentional.

Under 5.6.0:

$ tidy --version
HTML Tidy for Linux version 5.6.0
$ tidy -q --css-prefix foo --clean 1  foo.html 2>&1 | grep span
 span.foo-2 {color: red}
 span.foo-1 {color: #0000FF}
Here's some <span class="foo-1">blue</span> And here's some
<span class="foo-2">red </span>

Under 5.7.17:

$ tidy --version
HTML Tidy for Linux version 5.7.17
$ tidy -q --css-prefix foo --clean 1  foo.html 2>&1 | grep span
 span.foo2 {color: red}
 span.foo1 {color: #0000FF}
Here's some <span class="foo1">blue</span> And here's some
<span class="foo2">red </span>

So now it makes "foo1" instead of "foo-1" as a class name. Is that intentional? When did it get changed? This affects one of my tests in HTML::Tidy5, which pass under 5.6.0 and no longer pass under 5.7.17.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions