FR: check link validity
- Dominant language
- Python
- Stars
- 224
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
Mostly I use `restview` to view a reST file (always composed in `emacs`) before I upload it to some repo or wiki. Occasionally I use it to send HTML email, mostly to Gmail users. I don't normally send HTML mail, but when I do, it's like this:
1. render a file (e.g., `mail.rst`) until it looks the way I want
2. generate HTML (by `C-u` in the browser, then cut'n'paste into another file (e.g., `mail.html`)
3. send `mail.html` from `emacs` (yes, I'm one of "those people" :-)
- as a MIME attachment, but inline (so it doesn't look like an attachment).
- `BCC`ing me, so I know what it looks like. Usually I'll send myself a test post first, so I can be sure of how Gmail renders it ... which may not be the same as `restview`+firefox renders it.
And, just now, I found a way that Gmail renders better--or at least, more user-friendly-ly--than `restview`. In reST, I have a tendency to create one-off links like
```
`foo, and bar `_
```
until I create the same link several times, whereupon I create a reference, like
```
.. _foo, and bar: http://foo/bar
```
and reuse that. Unfortunately, sometimes I forget to remove the angle brackets, and so create a legal-but-useless reference like
```
.. _foo, and bar:
```
`restview` will cheerfully render that, so I thought I was OK until
1. I generated HTML to a file.
2. I sent a test email (to myself on Gmail) using the inline-attached HTML.
3. I opened the email in Gmail.
I then noticed that several links did not display! Whereupon I checked my reST file, and noticed the problem.
So if there's a way to do a simple syntax check of URIs before rendering, and to throw an error on bad URIs, this would probably help users.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing restview's rendering path and how it handles reST URI references. Determine where invalid URI syntax can be checked before rendering, then verify that malformed references produce an error instead of silently generating unusable links.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100