soundasleep / soundasleep/html2text_ruby
Options for URL matching and output
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 46
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
The code considers the href and text to be the same for both these cases:
(A) <a href="https://a.b.c">a.b.c</a>
(B) <a href="http://a.b.c">a.b.c</a>
Both are rendered as 'a.b.c'
However it does not consider the following to be the same:
(C) <a href="http://a.b.c/">a.b.c</a>
So the output is rendered as '[a.b.c](http://a.b.c/)'
I think the href in (A) should not be considered equal, whereas I expect (C) to render as 'a.b.c'.
For some circumstances, it might also be useful to keep the '[text](url)' format regardless of equality.
Maybe it would be useful to do the URL matching in a separate function that could optionally be provided by callers?
Additionally perhaps allow the output format to be varied, e.g. as
'text <url>' which seems to be common in text portions of mime mails.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file, test, or entry point is named. Start by locating the URL comparison and output-format handling, then clarify which matching rules and output formats are required before defining tests that cover the proposed cases and confirm the chosen behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- content
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100