Skip to content

Alternative css class naming doesn't work due to hardcoded values #12

@tommey

Description

@tommey

I tried to shorten the output by defining the css prefix as 'ac', but realized that it will never work due to the fact that the converter has ansi_color_ hardcoded and there is no connection between the Theme and the Converter.

$converter = new AnsiToHtmlConverter();
$converter->convert('some random cli output'); // returns classes with "ansi_color" prefix
$converter->getTheme()->asCss('css_prefix_for_ansi_color'); // returns styles with given prefix

Activity

linked a pull request that will close this issue on May 2, 2017
rquadling

rquadling commented on May 2, 2017

@rquadling

By the time the content has been converted, extracting the CSS with the new prefix is impossible.

If the prefix was supplied during construction of AnsiToHtmlConverter, that would then be possible.

I've created #16

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @rquadling@tommey

      Issue actions

        Alternative css class naming doesn't work due to hardcoded values · Issue #12 · sensiolabs/ansi-to-html