Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Bad highlighting for empty inline preformatted snippets #238

Open
1 task done
mcandre opened this issue Mar 19, 2019 · 4 comments
Open
1 task done

Bad highlighting for empty inline preformatted snippets #238

mcandre opened this issue Mar 19, 2019 · 4 comments

Comments

@mcandre
Copy link

mcandre commented Mar 19, 2019

Prerequisites

Description

When I use backticks to create preformatted code snippets, and the content is empty, then the syntax highlighing messes up.

Steps to Reproduce

  1. Insert two consecutive backticks in a GitHub flavored Markdown file.

Expected behavior:

The syntax highlighter correctly highlights the snippet as an empty inline section.

Actual behavior:

The syntax highlighter continues highlighting past the closing backtick, as if the rest of the file is an inline preformatted snippet, until a third backtick is found.

Reproduces how often:

100%

Versions

Atom : 1.35.1
Electron: 2.0.18
Chrome : 61.0.3163.100
Node : 8.9.3

apm 2.1.3
npm 6.2.0
node 8.9.3 x64
atom 1.35.1
python 2.7.15
git 2.18.0

Additional Information

macOS

@rsese
Copy link

rsese commented Mar 19, 2019

Thanks for the report and for using the issue template 👍 Just to clarify, I assume you're referring to the syntax highlighting in the editor and not how things look in Markdown Preview (preview seems to render things ok with the empty code span)?

@mcandre
Copy link
Author

mcandre commented Mar 23, 2019

I am referring to the syntax highlighting in the editor. I have not checked how the preview pane behaves for this edge case.

@rsese
Copy link

rsese commented Mar 25, 2019

Thanks for confirming 👍 This package is for Markdown Preview, the Markdown syntax highlighting is provided by https://github.com/atom/language-gfm so I'll move this over since I didn't find an issue that seems to report this (though I might have missed it or it's already covered by an existing issue).

@rsese rsese transferred this issue from atom/markdown-preview Mar 25, 2019
@rsese
Copy link

rsese commented Apr 1, 2019

Thanks again - I thought this was reported before but couldn't quite find an exact duplicate. Reproduced on 1.35.1 with macOS 10.12.6 with:

# hello world

Testing empty inline code block `` here

## testing

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants