Skip to content

Commit

Permalink
Highlight is misspelled
Browse files Browse the repository at this point in the history
Fixes: eclipse-theia#7026

Signed-off-by: Gareth Whittaker <[email protected]>
  • Loading branch information
garethwhittaker authored and vince-fugnitto committed Feb 5, 2020
1 parent 9eea8ae commit 0c01098
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## v0.16.0

Breaking changes:

- [core] fixed typo (highligh -> highlight) in caption highlight fragment [#7050](https://github.com/eclipse-theia/theia/pull/7050)

## v0.15.0

- [application-manager] added config to disable reloading windows [#6981](https://github.com/eclipse-theia/theia/pull/6981)
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/browser/tree/tree-decorator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ describe('tree-decorator', () => {

});

describe('caption-highligh', () => {
describe('caption-highlight', () => {

describe('range-contains', () => {
([
Expand All @@ -153,9 +153,9 @@ describe('tree-decorator', () => {
ranges: [{ offset: 0, length: 1 }]
});
expect(actual).has.lengthOf(2);
expect(actual[0].highligh).to.be.true;
expect(actual[0].highlight).to.be.true;
expect(actual[0].data).to.be.equal('a');
expect(actual[1].highligh).to.be.undefined;
expect(actual[1].highlight).to.be.undefined;
expect(actual[1].data).to.be.equal('lma');
});

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/browser/tree/tree-widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ export class TreeWidget extends ReactWidget implements StatefulWidget {
}
const createChildren = (fragment: TreeDecoration.CaptionHighlight.Fragment) => {
const { data } = fragment;
if (fragment.highligh) {
if (fragment.highlight) {
return <mark className={TreeDecoration.Styles.CAPTION_HIGHLIGHT_CLASS} style={style}>{data}</mark>;
} else {
return data;
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/browser/widget-decoration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export namespace WidgetDecoration {
/**
* Has to be highlighted if defined.
*/
readonly highligh?: true;
readonly highlight?: true;
}
/**
* Splits the `caption` argument based on the ranges from the `highlight` argument.
Expand All @@ -270,7 +270,7 @@ export namespace WidgetDecoration {
result.push({ data });
}
const { length } = ranges.splice(containerIndex, 1).shift()!;
result.push({ data: caption.substr(i, length), highligh: true });
result.push({ data: caption.substr(i, length), highlight: true });
data = '';
i = i + length - 1;
}
Expand Down

0 comments on commit 0c01098

Please sign in to comment.