Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect attribute assignment for multiple inline code blocks in a paragraph #52

Closed
rivy opened this issue Jan 7, 2018 · 2 comments
Closed

Comments

@rivy
Copy link
Contributor

rivy commented Jan 7, 2018

These tests fail...

it('should work with multiple inline code blocks in same paragraph', () => {
  src = 'bla `click()`{.c} blah `release()`{.cpp}';
  expected = '<p>bla <code class="c">click()</code> blah <code class="cpp">release()</code></p>\n';
  assert.equal(md.render(src), expected);
});

it('should work with interleaved inline code blocks in same paragraph #1', () => {
  src = 'bla `click()` blah `release()`{.cpp} foo `repeat()`{.c}';
  expected = '<p>bla <code>click()</code> blah <code class="cpp">release()</code> foo <code class="c">repeat()</code></p>\n';
  assert.equal(md.render(src), expected);
});

it('should work with interleaved inline code blocks in same paragraph #2', () => {
  src = 'bla `click()` blah `release()`{.cpp} foo `repeat()`{.c} bar `end()`';
  expected = '<p>bla <code>click()</code> blah <code class="cpp">release()</code> foo <code class="c">repeat()</code> bar <code>end()</code></p>\n';
  assert.equal(md.render(src), expected);
});
@rivy rivy changed the title attributes for second+ inline code blocks in a paragraph fails Incorrect attribute assignment for multiple inline code blocks in a paragraph Jan 7, 2018
arve0 added a commit that referenced this issue Jan 7, 2018
@arve0
Copy link
Owner

arve0 commented Jan 7, 2018

Thanks for reporting! :octocat:

Fixed in v1.2.1.

@arve0 arve0 closed this as completed Jan 7, 2018
@rivy
Copy link
Contributor Author

rivy commented Jan 8, 2018

Thanks! I appreciate the quick fix, and the module itself.

If you're interested, I'm using it in a user script for local markdown rendering (markdown-render).

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

No branches or pull requests

2 participants