From 433d13ebb53e39be3daea68be95f182083d626a7 Mon Sep 17 00:00:00 2001 From: Sage Abdullah Date: Sat, 23 Jul 2022 19:08:43 +0700 Subject: [PATCH] web: Add support for strict title matching --- web/src/giscus.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/src/giscus.ts b/web/src/giscus.ts index 3d90210f..547972be 100644 --- a/web/src/giscus.ts +++ b/web/src/giscus.ts @@ -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. */ @@ -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, @@ -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, @@ -384,6 +392,7 @@ interface ISetConfigMessage { term?: string; description?: string; number?: number; + strict?: boolean; reactionsEnabled?: boolean; emitMetadata?: boolean; inputPosition?: InputPosition;