Skip to content

Commit

Permalink
chore: line number dom elements updated to use span (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
gratcliff authored Sep 16, 2020
1 parent df2236e commit 85aeb0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion __tests__/codeMirror.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ describe('highlight mode', () => {
});

it('should return line numbers by default', () => {
expect(node.find('p').first().hasClass('cm-lineNumber')).toBe(true);
expect(node.find('span').first().hasClass('cm-lineNumber')).toBe(true);
});

it('should convert variable regex matches to a component instance', () => {
Expand Down
4 changes: 2 additions & 2 deletions src/codeMirror/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import 'codemirror/mode/meta';
// Pre output conversion
// CodeMirror "Gutter" -> Apply line numbers to styled lines
const defaultLineJsx = line => (
<p key={`ln-${line}`} className="cm-lineNumber">
<span key={`ln-${line}`} className="cm-lineNumber">
{line}
</p>
</span>
);

// Wrap children elements, seperated by line into divs
Expand Down

0 comments on commit 85aeb0e

Please sign in to comment.