replace highlightjs with prismjs

This commit is contained in:
Sebastian Sdorra
2020-06-16 21:04:07 +02:00
parent 7deb300c03
commit a4e6e4186a
9 changed files with 85 additions and 45 deletions

View File

@@ -29,7 +29,7 @@ import { File } from "./DiffTypes";
// styling for the diff tokens
// this must be aligned with th style, which is used in the SyntaxHighlighter component
import "highlight.js/styles/arduino-light.css";
import "prism-themes/themes/prism-ghcolors.css";
const DiffView = styled(Diff)`
/* align line numbers */
@@ -58,6 +58,22 @@ const DiffView = styled(Diff)`
&.unified .diff-widget-content .is-indented-line {
padding-left: 6.5rem;
}
/* conflict between prism and bulma number class */
.number {
align-items: inherit;
background-color: inherit;
border-radius: inherit;
display: initial;
font-size: inherit;
height: inherit;
justify-content: inherit;
margin-right: inherit;
margin-left: 0;
min-width: inherit;
padding: 0;
text-align: inherit;
}
`;
// WebWorker which creates tokens for syntax highlighting