Skip to content

Commit

Permalink
fix errors an make highlighting work as intended, when it is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Totto16 committed Apr 20, 2024
1 parent 900bf0d commit 141b7d7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,12 @@ const PreferencesEntries = Object.fromEntries(

const thirdParty = [
'htmlparser2',
'prismjs',
'date-fns/formatDistanceToNow',
'date-fns/locale',
'hex-color-converter',
'is-url',
'pretty-bytes',
'validate-color'
'validate-color',
];

const gnomeShellExternalModules = [/^resource:\/\/\/org\/gnome\/(shell|Shell\/Extensions)\/.*/];
Expand Down
2 changes: 1 addition & 1 deletion src/components/codePanoItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class CodePanoItem extends PanoItem {
this.body.set_style(`background-color: ${bodyBgColor}`);
this.label.set_style(`font-size: ${bodyFontSize}px; font-family: ${bodyFontFamily};`);

this.label.clutterText.set_markup(markupCode(this.language, this.dbItem.content.trim()));
this.label.clutterText.set_markup(markupCode(this.language, this.dbItem.content.trim(), characterLength));
}

private setClipboardContent(): void {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/clipboardManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export class ClipboardManager extends GObject.Object {

this.selectionChangedId = this.selection.connect(
'owner-changed',
async (_selection: Selection, selectionType: Meta.SelectionType, _selectionSource: Meta.SelectionSource) => {
async (_selection: Meta.Selection, selectionType: Meta.SelectionType, _selectionSource: Meta.SelectionSource) => {
if (this.settings.get_boolean('is-in-incognito')) {
return;
}
Expand Down
5 changes: 2 additions & 3 deletions src/utils/pango.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ export type Language = {
language: string;
};

export function detectLanguage(text: string): Language | undefined {
export function detectLanguage(_text: string): Language | undefined {
//TODO: implement language detection
debug('TODO');
return undefined;
}

export function markupCode(language: string, text: string): string {
export function markupCode(_language: string, _text: string, _characterLength: number): string {
//TODO implement code highlighting
debug('TODO');
return '';
Expand Down

0 comments on commit 141b7d7

Please sign in to comment.