diff options
author | August Skare <post@augustskare.no> | 2018-10-30 16:07:25 +0800 |
---|---|---|
committer | August Skare <post@augustskare.no> | 2018-10-30 16:07:25 +0800 |
commit | eb9d80214693f7fb7c95ab6da546b6d89d33bee6 (patch) | |
tree | d949930c5d1a622833446323504ad53ca0ec4ed3 /packages/dev-tools-pages | |
parent | 6b11ca6c1dc2a81abb17e85204f708f1ad68dec9 (diff) | |
download | dexon-sol-tools-eb9d80214693f7fb7c95ab6da546b6d89d33bee6.tar.gz dexon-sol-tools-eb9d80214693f7fb7c95ab6da546b6d89d33bee6.tar.zst dexon-sol-tools-eb9d80214693f7fb7c95ab6da546b6d89d33bee6.zip |
rename pesudo element in code gutter
Diffstat (limited to 'packages/dev-tools-pages')
-rw-r--r-- | packages/dev-tools-pages/ts/components/Code.tsx | 2 | ||||
-rw-r--r-- | packages/dev-tools-pages/ts/highlight.tsx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/packages/dev-tools-pages/ts/components/Code.tsx b/packages/dev-tools-pages/ts/components/Code.tsx index 6675422ef..f83d16dfa 100644 --- a/packages/dev-tools-pages/ts/components/Code.tsx +++ b/packages/dev-tools-pages/ts/components/Code.tsx @@ -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; diff --git a/packages/dev-tools-pages/ts/highlight.tsx b/packages/dev-tools-pages/ts/highlight.tsx index 64c5f9a17..6efba02f8 100644 --- a/packages/dev-tools-pages/ts/highlight.tsx +++ b/packages/dev-tools-pages/ts/highlight.tsx @@ -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>`; }) |