Skip to content

wikiparse.Linter (EN)

bhsd edited this page Dec 14, 2023 · 6 revisions

Other Languages

Introduction

This is a global constructor added by the browser extension, which can be used to report potential grammar errors and for online editors such as CodeMirror (demo).

Properties

include

type: boolean
Whether to be transcluded, default to false.

Methods

queue

param: string Wikitext to be analyzed returns: Promise<LintError[]>
Report potential grammar errors. The default language is English. To use other preset languages (Simplified Chinese or Traditional Chinese), please refer to wikiparse.setI18N method.

codemirror

param: string Wikitext to be analyzed returns: Promise<Diagnostic[]>
Similar to queue method, but the result has been converted to the format required by CodeMirror.

Clone this wiki locally