Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Change emDelimiter to * to fix having only part of word in italic #490

Merged
merged 2 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/serializers/markdown/markdown.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,14 @@ And this is the second line.`)
`I just love **bold text**.
I just love **bold text**.

Italicized text is the _cat's meow_.
Italicized text is the _cat's meow_.
Italicized text is the *cat's meow*.
Italicized text is the *cat's meow*.

This text is _**really important**_.
This text is _**really important**_.
This text is **_really important_**.
This text is **_really important_**.
This is really _**very**_ important text.
This text is ***really important***.
This text is ***really important***.
This text is ***really important***.
This text is ***really important***.
This is really ***very*** important text.

Strikethrough uses two tildes: ~~scratch this~~`,
)
Expand All @@ -419,7 +419,7 @@ Strikethrough uses two tildes: ~~scratch this~~`,
> - Revenue was off the chart.
> - Profits were higher than ever.
>
> _Everything_ is going according to **plan**.`,
> *Everything* is going according to **plan**.`,
)
})

Expand Down Expand Up @@ -576,7 +576,7 @@ My favorite search engine is [Duck Duck Go](https://duckduckgo.com "The best sea
test('styled links Markdown output is correct', () => {
expect(markdownSerializer.serialize(HTML_INPUT_STYLED_LINKS)).toBe(
`I love supporting the **[EFF](https://eff.org)**.
This is the _[Markdown Guide](https://www.markdownguide.org)_.
This is the *[Markdown Guide](https://www.markdownguide.org)*.
See the section on [\`code\`](#code).`,
)
})
Expand Down
2 changes: 1 addition & 1 deletion src/serializers/markdown/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const INITIAL_TURNDOWN_OPTIONS: Turndown.Options = {
bulletListMarker: BULLET_LIST_MARKER,
codeBlockStyle: 'fenced',
fence: '```',
emDelimiter: '_',
emDelimiter: '*',
strongDelimiter: '**',
linkStyle: 'inlined',
/**
Expand Down