Comments (5)
I am having a look at this now.
from aha.
I can't reproduce with the most recent version of aha
.
When I am doing this:
echo -e "Meow\n\033[1mLast segment %d (task index %d) completed: %s\033[0m\nMeow" | ./aha -b
I am getting this result:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- This file was created with the aha Ansi HTML Adapter. https://github.com/theZiz/aha -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="application/xml+xhtml; charset=UTF-8"/>
<title>stdin</title>
</head>
<body style="color:white; background-color:black">
<pre>
Meow
<span style="font-weight:bold;">Last segment %d (task index %d) completed: %s</span>
Meow
</pre>
</body>
</html>
So the most recent version does already fix your problem or I didn't understand it at all.
You can easily test the most recent version by download from this repository and build yourself by just typing make
and then call aha
with ./aha
to use the local version.
from aha.
Thanks for having a look. I found a way to reproduce the error, including with the latest version, using part of a log file my system generate : test_file.txt
I run: aha -b -f test_file.txt
And it outputs:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- This file was created with the aha Ansi HTML Adapter. https://github.com/theZiz/aha -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="application/xml+xhtml; charset=UTF-8" />
<title>test_file.txt</title>
</head>
<body style="color:white; background-color:black">
<pre>
[/topological_graph_planner INFO 1568883670.939314]: Planner reset! (Initial vertex: initial_vertex, initial vertex edges: [], target vertex: target_vertex, target vertex edges: [])
[/navigation/navigation_manager INFO 1568883670.991375]: <span style="font-weight:bold;">New plan received: [1800005219900140044: shelf_reposition, 0: stop]</span><span style="color:white;"></span><span style="color:white;background-color:white;">
[/navigation/navigation_manager INFO 1568883671.000147]: Plan optimized. Modified tasks: approximate: 0, give-way-to-ctrl: 0, stop-if-dockable: 0
</span>
</pre>
</body>
</html>```
I'm not sure whether the flags are right in my file, since I can't seem to display them properly. Maybe something upstream is messing them up, in which case I apologise for bothering :)
from aha.
You can easily reproduce the wrong behavior with echo "\e[39mdefault foreground \e[49mdefault background" | aha -b -n
.
aha was incorrectly treating SGR 39 and 49 as fixed colors and set them to color 9 instead of resetting the color back to the default value.
I opened PR #67 for this.
from aha.
Thank you for giving me an example, figuring out the error and fixing this!
from aha.
Related Issues (20)
- need help explaining htop fix
- Using the --no-header option strips all HTML tags, not just <head> section
- CSS option HOT 3
- Italics support HOT 6
- aha seems to escape it's own generated html HOT 3
- Feature request: Process CR characters to match final terminal output HOT 7
- font-size option HOT 1
- Using filter: instead of 2 sets of colors is broken (v0.5.1) HOT 1
- Add tests to the repo HOT 4
- Choose a different font for the output HOT 1
- `make install` does not work on macOS HOT 3
- contribution: convert aha's html output to github-compatible html
- Trying to get in touch regarding a security issue
- Buffering, and blocking HOT 1
- SI/SO doesn't seem to work
- --line-fix leads to double-spaced output
- Feature request: Ignore xterm alternate screen
- aha: Buffer overflow in main function at aha.c:973 in aha 0.5.1 allows remote attackers to cause a denial of service (crash) via a crafted input document.
- Problem with PHP
- New release HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aha.