internetarchive / internetarchive/openlibrary
Lone `**` in markdown creates italics evermore.
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 2k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 138
Description
### Problem
Having a lone pair of asterisks (`**`) on a line in an Open Library field that supports markdown (such as the `description` field of an `Edition` or `Work`) causes the following text for _the rest of the page_ to be in italics.
Note: this does _not_ appear to happen with lone asterisks (`*`). Instead, it the Open Library implementation seems to accurately follow GitHub, insofar as nothing happens and there are no italics.
#### Evidence / Screenshot
```
italics start here**
and never end.
```

#### Relevant URL(s)
### Reproducing the bug
1. Go to an edition description
2. Do enter `**` somewhere on a line and save.
* Expected behavior: The entire page following `**` _does not_ become italics (nor does anything become bold, following GitHub's lead).
* Actual behavior: The entire page following `**` _does_ become italics.
### Context
- Browser (Chrome, Safari, Firefox, etc):
- OS (Windows, Mac, etc):
- Logged in (Y/N): Y
- Environment (prod, dev, local): prod
### Notes from this Issue's Lead
#### Proposal & constraints
We appear to follow GitHub Flavored markdown, which doesn't appear to support italics or bold spanning lines. The latter case is one likely way people will run into the bug.
However, having unmatched `**` on a line in GitHub (e.g. here in this form) doesn't seem to cause an italicsfest. Instead, it merely does nothing. We should consider following GitHub's behavior.
#### Related files
#### Stakeholders
Contributor guide
Research direction
The issue does not name related files. Start by locating the markdown renderer used for Edition and Work descriptions, then reproduce the problem with a line containing `**` followed by more text. Done means unmatched `**` does not italicize the rest of the page, with a regression test covering the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100