Skip to content

Commit

Permalink
web: Add support for strict title matching
Browse files Browse the repository at this point in the history
  • Loading branch information
laymonage committed Jul 23, 2022
1 parent f902b98 commit 433d13e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions web/src/giscus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ export class GiscusWidget extends LitElement {
@property({ reflect: true })
term?: string;

/**
* Use strict title matching.
*/
@property({ reflect: true })
strict: BooleanString = '0';

/**
* Enable reactions to the main post of the discussion.
*/
Expand Down Expand Up @@ -212,6 +218,7 @@ export class GiscusWidget extends LitElement {
categoryId: this.categoryId,
term: this.getTerm(),
number: +this.getNumber(),
strict: this.strict === '1',
reactionsEnabled: this.reactionsEnabled === '1',
emitMetadata: this.emitMetadata === '1',
inputPosition: this.inputPosition,
Expand Down Expand Up @@ -291,6 +298,7 @@ export class GiscusWidget extends LitElement {
categoryId: this.categoryId || '',
term: this.getTerm(),
number: this.getNumber(),
strict: this.strict,
reactionsEnabled: this.reactionsEnabled,
emitMetadata: this.emitMetadata,
inputPosition: this.inputPosition,
Expand Down Expand Up @@ -384,6 +392,7 @@ interface ISetConfigMessage {
term?: string;
description?: string;
number?: number;
strict?: boolean;
reactionsEnabled?: boolean;
emitMetadata?: boolean;
inputPosition?: InputPosition;
Expand Down

1 comment on commit 433d13e

@vercel
Copy link

@vercel vercel bot commented on 433d13e Jul 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

giscus-component – ./

giscus-component.vercel.app
giscus-component-giscus.vercel.app
giscus-component-git-main-giscus.vercel.app

Please sign in to comment.