Fix highlighting issues (#1219)
This commit is contained in:
@@ -88,7 +88,7 @@ const Message = ({
|
|||||||
borderColor: string,
|
borderColor: string,
|
||||||
children: React.ReactNode
|
children: React.ReactNode
|
||||||
}) => {
|
}) => {
|
||||||
if (!highlightedRegion || highlightedRegion.startLine !== currentLineNumber) {
|
if (!highlightedRegion || highlightedRegion.endLine !== currentLineNumber) {
|
||||||
return <></>;
|
return <></>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ const CodeLine = ({
|
|||||||
? highlightedRegion.endColumn
|
? highlightedRegion.endColumn
|
||||||
: isLastHighlightedLine
|
: isLastHighlightedLine
|
||||||
? highlightedRegion.endColumn
|
? highlightedRegion.endColumn
|
||||||
: line.length;
|
: line.length + 1;
|
||||||
|
|
||||||
const section1 = line.substring(0, highlightStartColumn - 1);
|
const section1 = line.substring(0, highlightStartColumn - 1);
|
||||||
const section2 = line.substring(highlightStartColumn - 1, highlightEndColumn - 1);
|
const section2 = line.substring(highlightStartColumn - 1, highlightEndColumn - 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user