rename pesudo element in code gutter
This commit is contained in:
parent
6b11ca6c1d
commit
eb9d802146
@ -90,7 +90,7 @@ const StyledCodeDiff = styled(({ gutterLength, children, ...props }: any) => <co
|
||||
padding-left: calc(2.25rem + ${props => props.gutterLength}ch);
|
||||
|
||||
::before {
|
||||
content: attr(data-test);
|
||||
content: attr(data-gutter);
|
||||
|
||||
width: ${props => props.gutterLength};
|
||||
padding-left: 0.375rem;
|
||||
|
@ -31,7 +31,7 @@ function diffHighlight(language: string, code: any, gutter: any) {
|
||||
|
||||
const g = gutter[index];
|
||||
|
||||
return `<span data-test="${g !== undefined ? g + 'x' : ''}" class="line-${type}">${
|
||||
return `<span data-gutter="${g !== undefined ? g + 'x' : ''}" class="line-${type}">${
|
||||
hljs.highlight(language, line).value
|
||||
}</span>`;
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user