EbookFoundation / EbookFoundation/free-programming-books-parser
Parser doesn't take into account bold format in notes
- Dominant language
- JavaScript
- Stars
- 17
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
Having current code:
https://github.com/EbookFoundation/free-programming-books-parser/blob/dc53b8c803f96a7a0de6afabcab6949bfbb79b5a/index.js#L140-L172

If a bold format is found, the `i.value` is undefined and then the program crash. It should check if `i.type == "strong"` or have `i.children`.
Resources affected:
- https://github.com/EbookFoundation/free-programming-books/blob/fc4b0c5c139b952de979aa54a4de5141ea280906/books/free-programming-books-fr.md?plain=1#L73 
In general, we should extends the fix in depth to other inline formats like emphasis (already exists), bold, code, image...
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in index.js around lines 140-172 and reproduce the crash using the affected French resource linked in the issue. Trace how inline formats are handled, including strong and nested children, then verify that bold and the other named inline formats no longer cause parsing to fail.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100