This repository was archived by the owner on Nov 25, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -46,12 +46,12 @@ export interface CodeViewProps extends DOMFunctions {
4646
4747// Abstract implemetation for GitHub and Sourcegraph. Could potentially be sufficient for any code host
4848// but we may want to keep this as a configuration point.
49- const getDiffCodePart = ( codeElement : HTMLElement ) : 'new ' | 'old ' | undefined => {
49+ const getDiffCodePart = ( codeElement : HTMLElement ) : 'head ' | 'base ' | undefined => {
5050 switch ( codeElement . textContent ! . charAt ( 0 ) ) {
5151 case '+' :
52- return 'new '
52+ return 'head '
5353 case '-' :
54- return 'old '
54+ return 'base '
5555 default :
5656 return undefined
5757 }
Original file line number Diff line number Diff line change @@ -28,11 +28,11 @@ export interface DOMFunctions {
2828 */
2929 getLineNumberFromCodeElement : ( codeElement : HTMLElement ) => number
3030 /**
31- * Determine whether a code element is from the old or new part of a diff or not part of a diff.
31+ * Determine whether a code element is from the base or head part of a diff or not part of a diff.
3232 * @param codeElement is the element containing a line of code.
33- * @returns whether the line is `'old '`, `'new '` or `undefined` if not part of a diff.
33+ * @returns whether the line is `'base '`, `'head '` or `undefined` if not part of a diff.
3434 */
35- getDiffCodePart ?: ( codeElement : HTMLElement ) => 'old ' | 'new ' | undefined
35+ getDiffCodePart ?: ( codeElement : HTMLElement ) => 'base ' | 'head ' | undefined
3636}
3737
3838/**
@@ -213,7 +213,7 @@ export interface HoveredToken {
213213 line : number
214214 /** 1-indexed */
215215 character : number
216- part ?: 'old ' | 'new '
216+ part ?: 'base ' | 'head '
217217}
218218
219219interface LocateTargetOptions extends DOMFunctions {
You can’t perform that action at this time.
0 commit comments