Skip to content

Commit

Permalink
wikitext: make parseTemplates() config optional
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthvp committed Nov 13, 2024
1 parent 870ddd1 commit 21d5512
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wikitext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export class Parameter {
// written by me. (cc-by-sa/GFDL)

/** See {@link MwnWikitext.parseTemplates} */
export function parseTemplates(wikitext: string, config: TemplateConfig): Template[] {
export function parseTemplates(wikitext: string, config?: TemplateConfig): Template[] {
config = config || {
recursive: false,
namePredicate: null,
Expand Down Expand Up @@ -602,7 +602,7 @@ export default function (bot: Mwn) {
}

/** @inheritDoc */
parseTemplates(config: TemplateConfig): Template[] {
parseTemplates(config?: TemplateConfig): Template[] {
return (this.templates = parseTemplates(this.text, config));
}

Expand Down

0 comments on commit 21d5512

Please sign in to comment.