Skip to content

reset #49

Open
Open

Description

@szepeviktor

This is a very fine script!

Could you please handle reset?

# tput sgr0|hexdump  -C
00000000  1b 28 42 1b 5b 6d                                 |.(B.[m|

Activity

  1. szepeviktor commented on Jun 1, 2014

    @szepeviktor
    ContributorAuthor

    And please add this to pre's style to break long lines:

        white-space: pre-wrap;
        word-wrap: break-word;
  2. ralphbean commented on Jun 5, 2014

    @ralphbean
    Collaborator

    And please add this to pre's style to break long lines:

    This would be an easy pull-request. Would you like to be the one to add it?

  3. szepeviktor commented on Jun 5, 2014

    @szepeviktor
    ContributorAuthor

    Please handle tput sgr0: revert back the current schema's color OR tell me how to reset that your script understands.

  4. szepeviktor commented on Jun 5, 2014

    @szepeviktor
    ContributorAuthor

    http://manpages.ubuntu.com/manpages/hardy/man5/terminfo.5.html

    s0ds         s0        Shift to codeset 0 (EUC set 0, ASCII)
    ...
    s0ds=\E(B
    

    So \E(B is "Shift to codeset 0". I do not know what it is.
    I'd like to just "turn off all attributes" by tput.

  5. ralphbean commented on Jun 6, 2014

    @ralphbean
    Collaborator

    I'll take a look at handling sgr0 when I can. It seems like it would need to close as many </span> tags as had been opened.

  6. szepeviktor commented on Jun 6, 2014

    @szepeviktor
    ContributorAuthor

    Very dirty.

    cat "${HC_LOG}.txt" \
        | ansi2html --title="$HC_DOMAIN" --linkify --font-size=13px --light-background -s xterm \
        | sed 's/\x1B(B\b//g' > "${HC_LOG}.html"
  7. wookayin commented on Dec 17, 2017

    @wookayin

    A 3-year-old bug still not resolved? :(

  8. hartwork commented on Feb 3, 2022

    @hartwork
    Collaborator

    And please add this to pre's style to break long lines:

        white-space: pre-wrap;
        word-wrap: break-word;

    That was added in 2014 for release 1.0.7 by commit 418bef2 .

  9. hartwork commented on Feb 3, 2022

    @hartwork
    Collaborator

    Could you please handle reset?

    # tput sgr0|hexdump  -C
    00000000  1b 28 42 1b 5b 6d                                 |.(B.[m|
    

    I'm unsure about how that^^ sgr0 differs from \x1b[0m (Wikipedia) semantically (if so). The latter is supported…

    # hexdump -C <<<$'\x1b[0m'
    00000000  1b 5b 30 6d 0a                                    |.[0m.|
    00000005
    
    # echo $'\x1b[31mhello red\x1b[0m and hello normal' | ansi2html --inline
    <span style="color: #aa0000">hello red</span> and hello normal

    …since 2013 release 0.10.0 commit fce66a6.

  10. added
    needs-infoThis issue/PR needs more information to progress.
    on Feb 3, 2022
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

    needs-infoThis issue/PR needs more information to progress.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions