Skip to content

Commit

Permalink
fix: Change emDelimiter to * to fix having only part of word in i…
Browse files Browse the repository at this point in the history
…talic (#490)
  • Loading branch information
nats12 committed Oct 19, 2023
1 parent e3bc80b commit 7496ff2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
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

0 comments on commit 7496ff2

Please sign in to comment.