Show error message when there's no `</head>` tag

Open
#234 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
devtools

Research direction

Start at livereload/server.py around line 45, where the code looks for the closing head tag in index.html. Reproduce the case with an HTML file lacking , then make the failure report that the tag could not be found and verify that the message identifies index.html.

Written by the indexing model from the issue text.

Description

I ran into the following issue: I was lazy, had an index.html like

<!DOCTYPE html>

<p>Hello</p>

and so on (with a few more <script> etc), and live-reload mysteriously wasn't working.

It appears that HTML file needs to have a <head> tag, because the code apparently looks for </head>.

It would be nice if there's an error message printed in such a case: "couldn't find </head> in index.html" or whatever.

Dominant language
Python
Stars
1.1k
Forks
149
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lepture/python-livereload

All issues in lepture/python-livereload

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.