meteorlxy / vue-showdown

:page_with_curl: Use showdown as a vue component
https://vue-showdown.js.org
MIT License
129 stars 23 forks source link

Options: Tables misaligned with character ` #39

Closed belueg closed 2 years ago

belueg commented 2 years ago

Bug report

When I set the option for tables as true, there are some cases where if appears the character ` tables get misaligned. Below I share some screenshots to make the issue understandable.

Description

The tables normally work nice! But if in the table appears the character ` as a value, the tables get misaligned.

Steps to reproduce

The repo is private, but I can share with you this piece of code that we use to parse the markdown :)

   <vue-showdown
              v-if="!_.isEmpty(readme)"
              flavor="github"
              :options="{ tables: true }"
              class="markdown__file"
              :markdown="$sanitizeHtml(readme)"/>

Expected behavior

The ideal behavior would be that the tables don't get misaligned

Screenshots

Screenshot from GitHub README

image

Screenshot when markdown is parsed

image

Environment info

meteorlxy commented 2 years ago

Sorry for delay. vue-showdown is simply a wrapper of showdown.js, and your problem just looks like an issue of showdown.js.

It's better to report it in their repo: https://github.com/showdownjs/showdown

meteorlxy commented 2 years ago

As a personal suggestion about your docs, you can consider using `''` instead of `` if the default value is an empty string.

meteorlxy commented 2 years ago

Closing as it's an issue of showdown.js