Skip to content

Commit 85aeb0e

Browse files
authored
chore: line number dom elements updated to use span (#8)
1 parent df2236e commit 85aeb0e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

__tests__/codeMirror.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ describe('highlight mode', () => {
155155
});
156156

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

161161
it('should convert variable regex matches to a component instance', () => {

src/codeMirror/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import 'codemirror/mode/meta';
1111
// Pre output conversion
1212
// CodeMirror "Gutter" -> Apply line numbers to styled lines
1313
const defaultLineJsx = line => (
14-
<p key={`ln-${line}`} className="cm-lineNumber">
14+
<span key={`ln-${line}`} className="cm-lineNumber">
1515
{line}
16-
</p>
16+
</span>
1717
);
1818

1919
// Wrap children elements, seperated by line into divs

0 commit comments

Comments
 (0)