histoire-dev / histoire-dev/histoire
Newlines should be disregarded in Markdown
- Dominant language
- TypeScript
- Stars
- 3.6k
- Forks
- 212
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug
When writing docs in a Story, newlines should be regarded simply as spaces (standard Markdown behavior).
Example:
```html
# DotMenu
A simple menu component that displays a list of items in a dropdown menu. You
can supply
an
array
of... why is this happening?
```
renders:

But if you edit a README.md on GitHub and paste Markdown with newlines, it renders as a single sentence. Writing in a single line to achieve soft wrap is not practical:

### Reproduction
Not necessary.
### System Info
```shell
System:
OS: macOS 12.6.2
CPU: (8) arm64 Apple M1
Memory: 89.48 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.12.1 - ~/Library/Caches/fnm_multishells/7647_1676908209116/bin/node
Yarn: 1.22.19 - ~/Library/Caches/fnm_multishells/7647_1676908209116/bin/yarn
npm: 8.19.2 - ~/Library/Caches/fnm_multishells/7647_1676908209116/bin/npm
Browsers:
Chrome: 110.0.5481.100
Firefox: 108.0.2
Safari: 16.2
npmPackages:
@histoire/plugin-vue: ^0.15.8 => 0.15.8
@vitejs/plugin-vue: ^4.0.0 => 4.0.0
histoire: ^0.15.8 => 0.15.8
vite: ^4.1.2 => 4.1.1
```
### Used Package Manager
pnpm
### Validations
- [X] Follow our [Code of Conduct](https://github.com/histoire-dev/histoire/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guidelines](https://github.com/histoire-dev/histoire/blob/main/CONTRIBUTING.md).
- [X] Read the [docs](https://histoire.dev/guide/).
- [X] Check that there isn't [already an issue](https://github.com/histoire-dev/histoire/issues) that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/histoire-dev/histoire/discussions).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
Contributor guide
Research direction
No source files or tests are named in the issue. Start by locating the Markdown rendering path used for docs in a Story, then reproduce the example and add coverage showing that ordinary newlines render as spaces while intentional paragraph breaks remain distinct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- markdown, typescript
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100