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

Add ansi_to_text method #20

Merged
merged 1 commit into from
Jun 7, 2015
Merged

Add ansi_to_text method #20

merged 1 commit into from
Jun 7, 2015

Conversation

fetus-hina
Copy link
Contributor

It remove escape sequences and returns plain text.
For example,

var input = "\033[31mred\033[0m";
console.log(ansi_up.ansi_to_html(input)); // '<span style="color:rgb(187, 0, 0)">red</span>'
console.log(ansi_up.ansi_to_text(input)); // 'red'

Users can get safely plain text from escape sequence marked up string.

drudru added a commit that referenced this pull request Jun 7, 2015
@drudru drudru merged commit 9290483 into drudru:master Jun 7, 2015
@drudru
Copy link
Owner

drudru commented Jun 7, 2015

Really good stuff - I'll push the npm on Monday - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants