denoland / deno-gfm

Server-side GitHub Flavored Markdown rendering for Deno
https://jsr.io/@deno/gfm
MIT License
221 stars 33 forks source link

Rendering bug with dollar signs in tables #65

Closed lionel-rowe closed 8 months ago

lionel-rowe commented 1 year ago
| Fruit Name | Quantity | Unit Cost per Item | Subtotal |
|------------|----------|--------------------|----------|
| Apple      | 1        | $1.50              | $1.50    |
| Pear       | 2        | $2.00              | $4.00    |
| Orange     | 3        | $2.50              | $7.50    |
| Grape      | 60       | $0.05              | $3.00    |
| Total      |          |                    | $16.00   |

Renders like this:

image

Weirdly enough, deleting the space between the first pipe and the dollar sign in each row fixes it:

| Fruit Name | Quantity | Unit Cost per Item | Subtotal |
|------------|----------|--------------------|----------|
| Apple      | 1        |$1.50              | $1.50    |
| Pear       | 2        |$2.00              | $4.00    |
| Orange     | 3        |$2.50              | $7.50    |
| Grape      | 60       |$0.05              | $3.00    |
| Total      |          |                    | $16.00   |

image

lino-levan commented 1 year ago

Looks like yet another regex bug. We should expedite moving to remark (but there are a number of issues I'm having which makes this not super easy yet).