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

Missing HTML Head and tags #227

Open
jlpoolen opened this issue Dec 9, 2023 · 0 comments
Open

Missing HTML Head and tags #227

jlpoolen opened this issue Dec 9, 2023 · 0 comments

Comments

@jlpoolen
Copy link

jlpoolen commented Dec 9, 2023

I've been using ansi2html for years. On my Gentoo Linux, I upgraded and noticed a different behavior. Previously if I redirected output a full HTML page with Doctype declaration and tags was generated. Now, only inline elements are generated. The result is that the HTML does not render nicely. If I add the HTML and head and closing content, then the lines render without the white line artifact as before. I examined the HTML and there is definitely missing the <DOCTYPE>..., <html>, <head>... </head>,<body>, </body> </html> tags; it is as if the --inline command line option has become the default behavior.

HTML created under previous version with no artifacts of white lines between lines:
firefox_2023-12-09_10-46-48

The machine I'm running the ansi2html command on and the Gentoo package information:

jlpoole@ares /var/www/localhost/htdocs/demo $ eix ansi2html
[I] dev-python/ansi2html
     Available versions:  1.8.0-r3^t {test PYTHON_TARGETS="python3_10 python3_11 python3_12"}
     Installed versions:  1.8.0-r3^t(11:51:30 12/06/23)(-test PYTHON_TARGETS="python3_11 -python3_10 -python3_12")
     Homepage:            https://pypi.org/project/ansi2html/ https://github.com/pycontribs/ansi2html/
     Description:         Convert text with ANSI color codes to HTML

jlpoole@ares /var/www/localhost/htdocs/demo $

HTML created under current version 1.8.0-r3 which shows white line artifacts in between lines:
firefox_2023-12-09_10-45-20

I can provide more write-up and the actual files if the behavior of excluding the front and back matter is be design. The commands I used were very simple, I do not recall or have documented in notes using any command options:
cat myfile |ans2html >myfile.html

I wanted to make sure that I did not work up this Issue only to learn that there was a decided change of default behavior to not include the surrounding tags which includes CSS style information. Here's a sample of the previously generated output:

 https://pastebin.com/UiFGgis4   [expires in 1 year]
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

No branches or pull requests

1 participant