atom / language-gfm

GitHub Flavored Markdown in Atom
MIT License
101 stars 108 forks source link

No scope defined for bold/italic definition characters #235

Open sdalmonte opened 6 years ago

sdalmonte commented 6 years ago

Prerequisites

Description

There’s no scope defined for the underscores/asterisks used to mark text as italic or bold. This makes it impossible to style these characters independently of the text they contain.

Steps to Reproduce

  1. Create a GFM document.
  2. Mark text as __italic__, `italic`, `bold`, or `bold`.

Expected behavior:

<span class="syntax--markup syntax--italic syntax--gfm">
  <span class="syntax--punctuation syntax--definition syntax--begin syntax--gfm">_</span>
  italic
  <span class="syntax--punctuation syntax--definition syntax--end syntax--gfm">_</span>
</span>
<span class="syntax--markup syntax--italic syntax--gfm">
  <span class="syntax--punctuation syntax--definition syntax--begin syntax--gfm">*</span>
  italic
  <span class="syntax--punctuation syntax--definition syntax--end syntax--gfm">*</span>
</span>
<span class="syntax--markup syntax--bold syntax--gfm">
  <span class="syntax--punctuation syntax--definition syntax--begin syntax--gfm">__</span>
  bold
  <span class="syntax--punctuation syntax--definition syntax--end syntax--gfm">__</span>
</span>
<span class="syntax--markup syntax--bold syntax--gfm">
  <span class="syntax--punctuation syntax--definition syntax--begin syntax--gfm">**</span>
  bold
  <span class="syntax--punctuation syntax--definition syntax--end syntax--gfm">**</span>
</span>

Actual behavior:

<span class="syntax--markup syntax--italic syntax--gfm">_italic_</span>
<span class="syntax--markup syntax--italic syntax--gfm">*italic*</span>
<span class="syntax--markup syntax--bold syntax--gfm">__bold__</span>
<span class="syntax--markup syntax--bold syntax--gfm">**bold**</span>

Reproduces how often: 100% of the time

Versions

macOS 10.12.6
Atom    : 1.32.0
Electron: 2.0.9
Chrome  : 61.0.3163.100
Node    : 8.9.3
apm  2.1.2
npm  6.2.0
node 8.9.3 x64
atom 1.32.0
python 2.7.10
git 2.14.3

Additional Information

See also #101.