Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
fix some spacing issues related to source material
Browse files Browse the repository at this point in the history
  • Loading branch information
eggplantzzz committed Jun 14, 2023
1 parent 3876a17 commit 6f4ecd9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,24 @@ const useStyles = createStyles((theme, _params, _getRef) => ({
display: "flex"
},
spacer: {
minHeight: 16,
minWidth: 16,
height: 16,
width: 16,
minHeight: 22,
minWidth: 22,
width: 22,
marginRight: 5
},
breakpointSpacerContainer: {
minHeight: 22,
minWidth: 22,
width: 22,
display: "flex",
marginRight: 5,
alignItems: "center"
},
breakpointSpacer: {
minHeight: 16,
minWidth: 16,
height: 16,
width: 16,
height: 16,
backgroundColor: "#FA5252",
borderRadius: 25,
marginRight: 5
borderRadius: 25
}
}));

Expand Down Expand Up @@ -80,7 +84,9 @@ function SourceLine({
breakpoints &&
breakpoints[sourceId] &&
breakpoints[sourceId].has(lineNumber) ? (
<div className={classes.breakpointSpacer} />
<div className={classes.breakpointSpacerContainer}>
<div className={classes.breakpointSpacer} />
</div>
) : (
<div className={classes.spacer} />
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ export function addTextHighlightedClass(
sourceRange: SourceRange
) {
const editedLines = source.contents.split("\n").map((line, index) => {
if (line.length === 0) {
return line;
}
const { start, end } = sourceRange;
const lineHasHighlighting =
source.id === sourceRange.source.id &&
Expand Down

0 comments on commit 6f4ecd9

Please sign in to comment.