2026-04-23
Added
Fixed
AttributeToken.prototype.lintnow reports data attributes with underscores (_) in their names, which will be sanitized by the MediaWiki parserRedirectTargetToken.innerTextshould not be the final redirect target when there are double redirectsTranscludeToken.prototype.removeArgwhen removing an anonymous parameterLinkBaseToken.prototype.setLinkTextwhen the link text contains list-like syntax such as*or#ListToken.indentsetter when there are trailing spaces
Changed
- Setting the stage parameter of
Parser.parsetoInfinitynow implicitly callsToken.prototype.buildListsafter parsing to build the list items
Removed
- The old schema of
Config.doubleUnderscoreis no longer supported
2026-04-05
Added
- New category of linting errors: blank image alt attribute which is an accessibility issue
Fixed
nowrapis now a valid but obsolete attribute for<td>and<th>tags
Changed
LanguageService.prototype.destroynow returns a promise that resolves when the cleanup of temporary files is complete, but usually it is not necessary to await the promiseLanguageService.prototype.provideDiagnosticsnow always skips<score>extension tags containing LilyPond Scheme
2026-03-31
Added
- The preset configuration for Moegirlpedia is updated to include Extension:Math
Removed
LanguageService.prototype.provideCompletionItemsno longer suggests LilyPond commands that do not start with a backslash (\) in<score>extension tags
2026-03-26
Added
NowikiToken.prototype.lintnow reports invalid JSONC inside<maplink>and<mapframe>
Changed
- The executable
getParserConfignow executes JavaScript modules fetched from the specified MediaWiki site in a sandboxed environment using the permission model
2026-03-02
Added
Changed
- Improved performance for template parsing with many anonymous parameters
2026-02-23
Fixed
- The
lonely-httprule should ignorehttp://,RFC,PMIDorISBNfollowing word characters
2026-02-08
Added
AstElement.prototype.jsonnow takes an optionaldepthparameter to limit the depth of the output JSON- Suggestion for invalid gallery links
Fixed
AstText.prototype.lintwhen there are both<and unmatched]QuoteToken.prototype.lintstops offering suggestions for lonely apostrophes next to italic apostrophes which can be ambiguous
2026-01-22
Fixed
- The executable
getParserConfignow checks whether language conversion is disabled for a MediaWiki site
Removed
- Support for Node.js < 20.19.0
2026-01-13
Added
- New category of linting errors: invalid JSON inside
<templatedata>
Changed
- Setting
TagPairToken.selfClosingtotruenow removes the inner content of the tag
2026-01-01
Added
AttributesToken.prototype.cssnow inserts thestyleattribute if not presentParamLineToken.prototype.lintnow reports unknown parameter namesLanguageService.prototype.provideCompletionItemsnow suggests parameter names in<dynamicpagelist>and<inputbox>- Parse and report extension tags inside
<categorytree> - Parse
<pre>tags withformat="wikitext" ImageParameterToken.prototype.lintnow reports invalid values for thelinkparameter in gallery images
Fixed
AttributeToken.prototype.setValuefor an attribute without a valueAttributesToken.classListwhen theclassattribute contains multiple spaces between class namesAttributesToken.prototype.sanitizeshould leave spaces between attributesToken.prototype.createElementfor extension tagsToken.prototype.expandfor#contentmodelwhen the first argument iscanonical
2025-12-05
Added
- HTML conversion of
<syntaxhighlight>with Prism highlighting CategoryToken.innerTextToken.prototype.toHtmlnow supports category links at the end of the pageParser.callParserFunctionnow supports custom parser functions defined viaParser.setFunctionHookTitle.prototype.getFileUrlthat internally calls thefilepathparser function to generate aSpecial:Redirect/file/URLParser.lint,Parser.printandParser.toHtml
Fixed
AttributeToken.prototype.lintshould report invalid HTML attributes except foridfor<math>and<chem>tags- Issue with
Token.prototype.expandwhen expanding#tag - Issue with
Token.prototype.expandwhen expanding parser functions with template arguments Token.prototype.cloneNodeshould copy thepageNamepropertyImageParameterToken.linkcan now beundefinedfor invalid links in gallery images
Changed
FileToken.prototype.toHtmlnow callsTitle.prototype.getFileUrlto generate thesrcattribute
Removed
- The old schema of
Config.parserFunctionis no longer supported
2025-11-13
Added
Token.prototype.expandnow supports more parser functionsParser.callParserFunction- New category of linting errors: template arguments inside an extension tag
Token.prototype.expandnow supports transclusion of redirect pages
Fixed
- Duplicate linting errors reported by
<ref>tags FileToken.prototype.toHtmlfor inline images with vertical alignment parametersLinkBaseToken.prototype.toHtmlfor self links
2025-11-06
Added
HeadingToken.prototype.sectionQuoteToken.prototype.findMatchingQuoteandQuoteToken.prototype.getRangeNoincludeToken.prototype.lintnow reports useless attributes likeIncludeToken.prototype.lint- New category of linting errors: redirect-like text in list items and header-like text in plain text
Fixed
- Expanding custom parser functions defined via
Parser.setFunctionHook
2025-10-30
Added
TranscludeToken.prototype.newAnonArgandTranscludeToken.prototype.setValuenow support an optional parameter to append the new parameter on a new line
Fixed
- Parsing empty
<translate></translate>tag pairs
2025-10-28
Added
LanguageService.prototype.provideCompletionItemsnow suggests behavior switches with full-width underscores (_)
Fixed
AstText.prototype.lintnow ignores magic link-like texts in tokens where magic links are not parsedAttributeToken.prototype.escapeshould ignore extension tag attributes- Disable
AstElement.prototype.escapefor some token types
Changed
LanguageService.prototype.provideCompletionItemsnow suggests behavior switches when typing the first underscore (_or_)
2025-10-23
Added
Token.pageNameproperty that gets or sets the page nameToken.prototype.expandnow supports theintparser functionImageParameterToken.thumbproperty that gets the thumbnail filename from themanualthumbimage parameter- New category of linting errors: invalid thumbnail filenames in image parameters
Fixed
Parser.templateDircan now have a nested file structure to support subpages
Changed
- Extension:Math is now linted via texvcjs instead of MathJax
- A copy of the MediaWiki-flavored GeoJSON schema is now included in the package
2025-10-16
Added
- Parse the
detailsattribute of a<ref>extension tag - New categories of linting errors, including
<ref>tags in internal or external links, and invalid URLs - Parse behavior switches with full-width underscores (
__)
2025-09-30
Added
- Better support for
<tvar>tags from Extension:Translate - The
parameteroption of the invalid-gallery rule now also reportswidthparameters of images withpxpxunits
Fixed
Changed
- The default severity of the
bothandselfClosingoptions of the unmatched-tag rule is nowerrorinstead ofwarning
2025-09-20
Added
- Language conversion in the
altparameter of images FileToken.prototype.lintnow also reports missing file extensions
Fixed
- The
idattribute of a section header starting with underscores (_) AttributeToken.prototype.lintshould report evil attribute values such asjavascript:
Changed
- The rule severity can now be specified as a string:
'off','warning'or'error', which are equivalent to0,1and2, respectively
2025-09-14
Added
Parser.lintConfignow supports more properties, includingrules,computeEditInfo,fixandignoreDisables
Fixed
- TeX macro detection in
LanguageService.prototype.provideDiagnostics
2025-08-27
Added
Parser.configPathsthat is used to specify additional paths to look for parser configuration files
2025-08-19
Added
- Descriptions for the quick fixes are now localized
Changed
- The message keys are all changed to follow the Mediawiki convention
2025-08-14
Added
AstNode.prototype.removenow takes an optionalownLineparameter to remove the current line if it is empty- Quick fix for the nested-link rule
LanguageService.prototype.provideRefactoringActionthat provides refactoring actions for the selected textLanguageService.prototype.resolveCodeActionthat resolves fix-all code actions- The tag-like rule now supports custom tags
Fixed
- Now
<translate>extension tags in HTML comments or<includeonly>tags are not parsed - The bold-header rule now ignores bold apostrophes or tags inside extension tags
- No
HeadingTokenshould be parsed inside a<poem>tag - Quick fixes for the url-encoding rule should ignore special characters including
!<>[]{|} <tvar>extension tags inside the URL of an external link is now correctly parsed
Changed
- Update the
<img>extension tag - According to the Wikimedia Foundation's policy, the
getParserConfigexecutable, theParser.fetchConfigmethod and theLanguageService.prototype.setTargetWikipediamethod now requires auserparameter to identify the user when accessing Wikimedia sites
2025-08-01
Added
HtmlToken.prototype.getRangethat returns the range of the HTML tag pair- New properties and methods of
AstRange:childNodes,firstChild,lastChild,children,firstElementChild,lastElementChild,childElementCount,offsetHeight,offsetWidth,getClientRects,remove,before,after,replaceWith,append,prepend,removeChild,getRootNode,closest,querySelector,querySelectorAll,getElementByTypes,getElementById,getElementsByClassName,getElementsByTagName,escape
Fixed
- Updated tag attributes for the
<ref>extension tag
2025-07-25
Added
LanguageService.prototype.provideDiagnosticsnow includes available quick fixes for Stylelint errors
Fixed
AstRange.endIndexwhen the range is not empty
Changed
- The preset configuration for Moegirlpedia is updated to support the latest version of Extension:MoeImgTag
2025-07-22
Added
- Now the rule configuration for
Token.prototype.lintcan be set viaParser.lintConfig Parser.getWMFSitethat returns the name and host name of a MediaWiki sites hosted by WikimediaLanguageService.prototype.setTargetWikipedianow supports other WMF-hosted sitesTitle.prototype.toSubjectPage,Title.prototype.toTalkPage,Title.prototype.toBasePageandTitle.prototype.toRootPagenow return theTitleobject itself for chainingTranscludeToken.prototype.getFramethat returns a basic JSON frame object for the#invokeparser functionParser.setFunctionHookthat defines a custom parser function hook for theToken.prototype.expandmethodParser.setHookthat defines a custom extension tag hook for theToken.prototype.expandmethodTitle.displayTitle
Fixed
Parser.normalizeTitlenow correctly handles titles with nested transclusions- Conversion rules can have upper-case letters in their variant names
Changed
- The preset configurations are updated
- For Moegirlpedia,
<img>tags are now parsed as extension tags (Extension:MoeImgTag) instead of HTML tags - Lowered severity of invalid gallery image parameters and duplicate categories
- Lowered severity of unmatched HTML tags
- Lowered severity of plain-text apostrophes next to bold/italic apostrophes
- Lowered severity of unclosed apostrophes in section headers
- Lowered severity of fostered table content
- Lowered severity of double square brackets or curly braces
- Lowered severity of lonely
http://orhttps://
2025-07-14
Fixed
- HTML conversion of
<poem>containing<nowiki>or leading: - HTML conversion of
<h1>to<h6>without andidattribute - HeadingToken as the first token of a
<poem>tag does not need to be on a new line - Sanitization of AttributeToken
- Use the legacy
rgba()function instead of#rrggbbaainLanguageService.prototype.provideColorPresentationsfor colors with an alpha channel NowikiToken.prototype.cloneNodeshould copy thenameattribute if it exists
Changed
- The object parameter of
Parser.createLanguageServiceis now optional
2025-06-12
Added
TranscludeToken.function- Some time-related variables are now expanded, e.g.,
CURRENTMONTHandLOCALMONTH Parser.nowproperty that specifies the current time for parsing
Fixed
- An issue with one-line definition lists (
;:) when;is followed by whitespace - An occasional issue with multi-level indentation in a one-line definition list (
;;dt::dd)
Changed
TranscludeToken.prototype.printnow highlights the modifiers (e.g.,subst:) as magic wordsAttributeToken.prototype.toHtmlnow drops emptyidattributes- Lowered severity of unnecessary URL encoding in internal links
2025-06-07
Added
AstElement.prototype.printnow adds a red wavy underline to invalid wikitextToken.prototype.expandnow supports percent-encoded file names (e.g.,%3Ffor?)
Fixed
- Interaction between one-line definition lists (
;:) and void HTML tags
2025-05-29
Added
Token.prototype.lintcalled on the root node now returns an optionaloutputproperty, which is a string after all auto-fixes are appliedTranscludeToken.module
2025-05-12
Fixed
- Wrong message keys in simplified Chinese localization
Changed
- Lowered severity of useless fragments
AstText.prototype.lintnow ignores thegroupattribute of a<ref>or<references>tag- Lowered severity of lonely language conversion brackets
- Lowered severity of an unexpected template argument
2025-05-09
Changed
- Lowered severity of a duplicated image caption consisting of a template or a magic word
2025-04-26
Fixed
AttributesToken.nameshould betd,thorcaptionfor table cellsAttributeToken.tagshould betd,thorcaptionfor table cells
Changed
- Lowered severity of a lonely apostrophe followed by a closing bold/italic mark
- Lowered severity of a lonely bracket surrounding an internal or external link
AstText.prototype.lintnow ignores thenameattribute of a<ref>tag- Lowered severity of lonely
RFC,PMIDorISBN - Lowered severity from
RedirectTargetToken.prototype.lint - Lowered severity of multiline comments inside
<gallery> - Lowered severity of disallowed HTML tags
2025-04-16
Added
LanguageService.prototype.provideCompletionItemsnow supports extension tags<math>and<chem>LanguageService.prototype.provideDiagnosticsnow reports unknown macros in extension tags<math>and<chem>- Accepted attribute names for extension tags
<math>,<chem>,<phonos>,<section>,<syntaxhighlight>,<timeline>and<quiz> - Parse the extension tag
<hiero> - Parse Extension:Translate
Fixed
- External links starting with
//in<imagemap>are valid - Internal links with empty alt text in
<imagemap>are valid - The executable
getParserConfigfor MediaWiki sites not hosted by Wikimedia - More potential stack overflow issues
- Do not suggest more than 6 consecutive
=when fixing unbalanced=in a section header - A unicode number before a URL protocol prevents it from being parsed as an external link
2025-04-07
Added
LanguageService.prototype.provideDiagnosticsnow supports extension tags<math>and<chem>if MathJax is available
Fixed
ImageParameterTokencontaining comments that do not break the parameter syntax
2025-04-03
Added
Parser.fetchConfigthat executes thegetParserConfigexecutableTranscludeToken.prototype.getPossibleValuesnow supports the#switchparser function
Fixed
- More cases where potential memory leak may occur
- Expansion of
#switch TableToken.prototype.lintnow handles arguments and a set of magic words recursively- Stack overflow in
TableToken.prototype.getLayout - Issue with
AstText.prototype.lintwhen the text contains certain unicode characters
Changed
- Lowered severity of fostered content of
#invokeinTableToken.prototype.lint
2025-03-24
Added
AstElement.prototype.escapemethod that escapes=and|characters for building a template parameter
Fixed
- Stack overflow when there are too many tokens in a page
TableToken.prototype.lintshould not report appropriate HTML tags (<tr>,<td>,<th>and<caption>) asfostered-content
Changed
ParameterToken.prototype.jsonnow includes theduplicatedproperty only if it istrueTdToken.prototype.jsonnow includes therowspanandcolspanproperties only if they are greater than1FileToken.prototype.lintnow reports warnings instead of errors for duplicatedcaptionparameters of an unknown file type
2025-03-15
Added
Config.functionHookpropertyLanguageService.prototype.provideLinksnow supports thefilepathparser function- New preset configuration
jawikifor Japanese Wikipedia - The executable
getParserConfignow supports more MediaWiki sites with the CodeMirror extension installed
Fixed
- Only function hooks are allowed to take parameters
- Localized parser functions with a full-width colon
:instead of a half-width colon:
Changed
LanguageService.prototype.resolveRenameLocationno longer supports magic words
2025-03-13
Added
LanguageService.prototype.setTargetWikipediathat updates the parser configuration for a specific Wikipedia language editionLanguageService.prototype.provideDocumentColorsnow supports color names instyleattributesLanguageService.prototype.provideHovernow supports HTML tags and attributesAttributeToken.prototype.lintnow reports invalid attribute values of HTML tags
2025-03-11
Added
LanguageService.prototype.provideCompletionItemsnow provide documentations for suggested magic wordsLanguageService.prototype.provideDiagnosticsandLanguageService.prototype.provideCompletionItemsnow support the<score>extension tag written in LilyPond- New executable
getParserConfig
Fixed
- Unhandled promise rejection in
LanguageServiceif Stylelint is unavailable - Manual upright parameters (e.g.,
upright=$1) of images are not treated as upright parameters - The magic words
#section,#section-xand#section-hare recognized as aliases of#lst,#lstxand#lsth, respectively
Changed
- The behavior switch
__DISAMBIG__now has the nameDISAMBIGUATION, and the behavior switch__EXPECTED_UNCONNECTED_PAGE__now has the nameEXPECTEDUNCONNECTEDPAGE
2025-03-08
Added
Token.prototype.buildListsthat builds alllist-rangetokensLanguageService.prototype.provideDiagnostics,LanguageService.prototype.provideHoverandLanguageService.prototype.provideCompletionItemsnow work for embedded JSON in extension tags (templatedata,mapframeandmaplink) and inline CSSLanguageService.prototype.provideFoldingRangesnow works for embedded JSON in extension tags (templatedata,mapframeandmaplink)Token.prototype.lintnow reports errors and warnings for inline CSSAttributeToken.prototype.cssthat gets or sets the value of a CSS propertyAttributeToken.prototype.jsonnow includes thetagpropertyLanguageService.includeproperty that configures the transclusion option for parsing
Fixed
Token.prototype.findEnclosingHtmlLanguageService.prototype.provideCompletionItemsfor attribute keys of extension tags, HTML tags and tables- Various issues with
Token.prototype.cloneNode Title.prototype.getUrlnow ignores an empty fragment
Changed
HtmlToken.prototype.findMatchingTagnow returnsundefinedif there is no matching tag instead of throwing a syntax error
2025-02-26
Fixed
- Potential memory leak when parsing a page with a large number of transclusions
Changed
- A
LanguageServiceinstance can provide both signature help and other services
2025-02-25
Added
- English translation for JSDoc annotations
LinkBaseToken.prototype.jsonnow includes thefragmentpropertyCategoryToken.prototype.jsonnow includes thesortKeypropertyFileToken.prototype.jsonnow includes theextensionpropertyListToken.indentpropertyListToken.prototype.jsonnow includes theindentpropertyTdToken.prototype.jsonnow includes therowspanandcolspanpropertiesArgToken.prototype.jsonnow includes thedefaultpropertyConverterRuleToken.prototype.jsonnow includes thevariantpropertyGalleryToken.prototype.jsonnow includes thewidthsandheightspropertiesParameterToken.prototype.jsonnow includes theduplicatedproperty
Fixed
LanguageService.prototype.provideHoverfor variables without a parameterToken.prototype.toHtmlwhen there are mixed apostrophes and<b>/<i>tags
2025-02-21
Added
TranscludeToken.prototype.getModulethat returns the module name and the function name of a#invokeparser functionLanguageService.prototype.provideCompletionItemsnow suggests parameter keys for the#invokeparser function
Fixed
LanguageService.prototype.provideCompletionItemsshould not suggest argument names, link targets, template names, parameter keys or image widths at the cursor positionLanguageService.prototype.provideCompletionItemsshould suggest with a leading:for the transclusion of a main namespace articleAstElement.linksshould not return internal links inside the link parameter of an image twiceAstNode.fontfor nodes following an external linkAstNode.fontwhen there are unmatched<b>or<i>tagsLanguageService.prototype.provideRenameEditsshould not rename thenameattribute of a<ref>tag with a differentgroupattribute
Changed
LanguageService.prototype.provideDefinitionnow returns theLocationof the<ref>inner content for anyPositionwithin a<ref>tag that has anameattributeLanguageService.prototype.provideCompletionItemsinserts a>character after completing a closing tag when necessaryLanguageService.prototype.provideCompletionItemsinserts a=character after completing a template parameter key when necessary
2025-02-16
Added
LanguageService.prototype.provideInlayHintsthat computes inlay hints for template anonymous parametersAstNode.prototype.getLinesthat returns an array of the source text, the start and end positions of each line- Signatures of more parser functions from extensions
Fixed
LanguageService.prototype.provideDiagnosticsnow reports warningsLanguageService.prototype.resolveRenameLocationshould ignore file and category links- The outputs of
wikiparse.Linter.prototype.codemirrorandwikiparse.Linter.prototype.monaconow strictly follow the CodeMirror and Monaco Editor specifications, respectively
Changed
- The return values of
AstElement.prototype.caretPositionfromIndexand its related methods are now different if the index is at the boundary between two tokens AstElement.prototype.elementFromIndexand its related methods now returnTokeninstead ofAstNode
2025-02-10
Added
Parser.createLanguageServicewill create aLanguageServiceinstance that provides various functionsConfig.articlePathdoes not have to include'$1'now
Fixed
"sideEffects": falseis now added topackage.jsonto facilitate tree-shaking{{名字空间}}and{{命名空間}}are now correctly recognized as{{NAMESPACE}}
2025-01-30
Fixed
<and>in external links
Changed
- Full HTML entity decoding via entities
Removed
- Interwiki prefixes are no longer available from the preset configuration files
2025-01-15
Fixed
- Case-insensitive variables without a parameter, e.g.,
#language, and case-sensitive parser functions requiring a parameter, e.g.,DEFAULTSORT
Changed
- The schema for parser configurations is changed, including changes for the
parserFunctionanddoubleUnderscoreproperties and a newvariableproperty
2025-01-11
Added
- Named parameters are recognized for the
#tagparser function
2024-12-13
Added
- More auto-fix and suggestions for linting errors
Removed
- Removed category of linting errors: duplicated
<ref>name
2024-12-06
Added
- New category of linting errors: lonely
RFC/PMID/ISBN LintError.Fixnow has a new string propertydesc
Changed
- The preset configurations are updated
2024-12-01
Fixed
Token.prototype.lintshould ignore<ref>tags with identical names but in different groups
2024-11-29
Added
- New category of linting errors: duplicated
<ref>name
2024-11-17
Fixed
TranscludeToken.namefor some new parser functions, e.g.,#dir
2024-11-14
Fixed
AttributeToken.prototype.lintnow correctly reports invalid attribute names of<pre>tags
2024-11-04
Fixed
- Parse and report extension tags inside
<inputbox>/<dynamicpagelist> - Parse transclusion inside
<references> {{\n=a=\n}}is now parsed asTemplate:=a=instead of<p>{{</p><h1>a</h1><p>}}</p>
2024-11-01
Fixed
- Case-insensitive
<nowiki>inside a<pre>tag - HTML comments inside a
<inputbox>tag
Changed
IncludeToken.prototype.lintnow also reports useless attributes
2024-10-24
Added
- New pseudo selectors
:validand:scope - Pseudo selector
:has()now supports relative selectors Parser.parsenow accepts an array of token types as the third argument to specify the maximum stage of parsing
Fixed
Token.prototype.expandnow supports file names containing꞉as a substitute for:in a Windows file system- Order of HTML/URL decoding in
Titleparsing
Changed
AttributesToken.prototype.lintnow reports warnings instead of errors for useless non-word characters
2024-08-24
Fixed
TranscludeToken.prototype.lintshould not report#in an HTML entity as template page fragment
2024-08-17
Fixed
AttributeToken.prototype.lintfor unknown extension tags, since v1.12.5
2024-08-16
Added
Fixed
AttributesToken.prototype.lintnow correctly reports invalid attribute names containing{{!}}
2024-08-07
Added
HeadingToken.id- New category of linting errors: duplicated id
Fixed
HeadingToken.prototype.toHtmlshould skip language conversion for theidattributeHeadingToken.prototype.toHtmlwhen there are more than 3 duplicated IDs- Descendant combinator
Changed
ArgToken.prototype.jsonno longer includes thedefaultproperty
2024-08-04
Fixed
- Fix a rare case of
LinkToken.prototype.toHtmlfor the Media namespace
2024-07-29
Added
Title.prototype.getRedirectionTranscludeToken.prototype.toHtmlfor nonexistent transcluded pages and transclusion loops
Fixed
HeadingToken.prototype.toHtmlnow correctly handles headings with duplicated IDs- Remove unnecessary implicit leading newline from
Token.prototype.expand - Remove unexpected leading space for fostered table content in
TableToken.prototype.toHtml - A valid title should not contain characters that are escaped as HTML entities twice (e.g.,
&amp;) Token.prototype.solveConstfor#switchwith a fall-through default caseToken.prototype.solveConstfor#ifeqwhen comparing two numbers or strings containing HTML entitiesToken.prototype.toHtmlfor various token types that have a bold and/or italic styleRedirectTargetToken.innerTextshould replace underscores with spacesTitle.fragmentshould replace spaces with underscores- Some Wikitext syntaxes at SOL, including headings and lists, are now allowed following behavior switches except
__toc__ <p>wrapping forTdToken.prototype.toHtml- Media namespace redirects
Token.prototype.toHtmlwhen<blockquote>interferes with indent-<pre>AttributeToken.prototype.lintshould also report reserved data attributes
Changed
AstText.prototype.lintno longer reportslonely-httpforhttp://inext-link-textToken.prototype.expandnow removes all comments and expandsArgTokenHeadingTokennow includes trailing blank lines- By turning
Parser.redirectsandTitle.fragmentinto accessors, page titles and fragments are now automatically normalized - The second arguments of
AstText.prototype.deleteDataandAstText.prototype.substringDataare now optional - The first item of the
doubleUnderscoreproperty ofConfigis nowRecord<string, string>
2024-07-10
Fixed
- Lonely
pxshould be considered as caption inImageParameterToken
2024-07-08
Added
<p>wrapping forToken.prototype.toHtml- Conversion from Wikitext lists to HTML
ConverterToken.prototype.toHtmlwhen there are variant flagsFileToken.prototype.toHtml,FileToken.prototype.getFrame,FileToken.prototype.getHorizAlignandFileToken.prototype.getVertAlignImageParameterToken.prototype.getUrl
Fixed
ConverterFlagsToken.prototype.getEffectiveFlagswhen there are variant flagsExtLinkToken.prototype.toHtmlwhen there are nested internal linksArgToken.prototype.cloneNode,AttributeToken.prototype.cloneNode,AttributesToken.prototype.cloneNode,GalleryToken.prototype.cloneNodeandMagicLinkToken.prototype.cloneNode- Implicit newline in
Token.prototype.expand Token.prototype.expandfor template redirectsTitle.prototype.getUrlfor self links- Definition list parsing since v1.10.0
LinkBaseToken.prototype.toHtmlwhen wrapped by apostrophesExtLinkToken.prototype.toHtmlandMagicLinkToken.prototype.toHtmlfor invalid URLsTitleparsing with multiple consecutive spaces and/or underscores- Self-closing
<ref>tags inside a<references>tag HtmlTokenshould not be bold or italicImageParameterToken.sizewhen the parameter ends withpxpxImageParameterToken.linkwhen containingQuoteToken- Image parameter parsing for
link=followed by an invalid external link - Framed images and manual thumbnails are always unscaled
Changed
ListBaseToken.prototype.toHtmlnow returns an empty stringListBaseToken.prototype.getRangenow modifies the AST and returns a plain token with the typelist-range
Removed
Token.prototype.redoQuotesmethod, which does not work as expected
2024-06-26
Added
AstNode.prototype.isToken.prototype.expandParser.templateDirandParser.templatespropertiesConfig.articlePathpropertyTitle.prototype.getUrlRedirectTargetToken.innerTextandMagicLinkToken.innerTextpropertiesAstNode.prototype.toHtmlmethod, which is an incomplete implementation of Wikitext-to-HTML conversion
Fixed
SyntaxToken.prototype.lintnow also reports errors from itschildren- Parse the
captionattribute of a<gallery>extension tag - Fix
LinkToken.prototype.pipeTrick - Absolute path on Windows in
Parser.configandParser.i18n Token.prototype.cloneNodewhen applied to aroottoken- Pseudo selector
:any-linkforRedirectTargetToken AttributesToken.prototype.lintnow reports duplicatedclassattributes
Changed
LinkBaseToken.prototype.setTargetnow only adds leading:when necessaryMagicLinkToken.prototype.lintnow only reports the first occurrence of full-width punctuations infree-ext-linkas an errorTranscludeToken.prototype.lintnow ignores the fragment of an invalid module nameToken.prototype.solveConstnow returns a copy of the original tokenMagicLinkToken.prototype.getUrlnow returns a string for ISBN links- Each
ListTokennow contains at most one; AttributeToken.prototype.getValuenow always trims leading and trailing whitespace
Removed
RedirectTargetToken.prototype.textmethod overridingrbspanattribute of a<rt>tag
2024-06-18
Added
AstElement.lengthandAstText.lengthare now writable
Fixed
- Fix event handling for
DoubleUnderscoreToken
Changed
- No longer report full-width punctuations in
ext-link-urlas an error inMagicLinkToken.prototype.lint
2024-06-10
Fixed
- Fix event handling since v1.9.0
- Fix issues related to
Parser.viewOnly
2024-06-09
Fixed
AstNode.font,AstNode.boldandAstNode.italicfor external links which have a lower precedence than apostrophes- Pseudo selector
:any-linkforFileToken - Pseudo selector
:lang() - Pseudo selector
:regex()forAttributesToken
Changed
Token.prototype.normalizeTitleis now a private methodParser.getConfigis now available for public use
Removed
- Pseudo selectors
:nth-child,:nth-last-child,:nth-of-typeand:nth-last-of-typeno longer support comma-delimited arguments
2024-05-26
Added
- Magic links (RFC, PMID and ISBN) are now parsed as
MagicLinkToken - New property
Parser.viewOnly, which helps to speed upAstElement.prototype.lint
Changed
- Improved performance for table parsing inside a template
2024-05-20
Added
- New getters
AstNode.font,AstNode.boldandAstNode.italic
Fixed
Token.prototype.findEnclosingHtmlnow correctly handles self-closing tags\ris now automatically removed from EOL for CRLF (\r\n) line breaks
Changed
Token.prototype.sectionsnow returns an array ofAstRangeobjectsAstNode.nextVisibleSibling,AstNode.previousVisibleSibling,AstNode.prototype.destroyandAstNode.prototype.getLinewere previously only available forAstElement, but now they are also available forAstText
2024-05-13
Added
- Parse redirect pages
Fixed
- Allow an external image as
ext-link-text - Ignore duplicated parameters containing extension tags in
TranscludeToken.prototype.lint - Self-closing tags
<noinclude/>and<includeonly/>are now valid
Changed
- For redirects with a fragment, the fragment is now ignored by
Title.title
2024-03-17
Added
- Parser tests are now available
Fixed
- Mimic the structure of CSS combinators
- Fully escape
<and>when printing tag attributes - Recognize invalid
Titlepatterns - Image size parameter with a suffix of
pxpxis now also valid - Fix conflicts between image parameters and external links
- Fix free external links led by a Unicode character
Changed
- Error messages are gradually translated into English
2024-03-13
Added
- Linting errors can now be disabled using inline comments
Fixed
- Allow the image parameter
pagein PDF file links - Disallow empty strings as the
manual-uprightimage parameter - Use
parseInt()for therowspanandcolspanproperties ofTdToken
Changed
- The start position of a linting error associated with a
TrTokenis now one character ahead
2024-03-12
Fixed
TableToken.prototype.lintnow ignores inconsistent table layout due to a largecolspanvalue in the last column
Changed
- Lowered severity of ignored lines due to no image in
GalleryToken.prototype.lint
2024-03-07
Fixed
- Parsing a
TdTokenafter anotherTdTokenwith a multilineHtmlTokenin it ExtLinkTokenwhen the link text starts with a token with higher precedence
Changed
Title.fragmentno longer decodes the deprecated MediaWiki-style fragment encoding
2024-03-06
Fixed
ListToken.prototype.getRangefor<dt>items
Changed
- Attribute selectors now regard falsy values as non-existent attributes
HeadingToken.innerTextandTdToken.innerTextnow trim leading and trailing whitespace, whileLinkToken.innerTexttrims leading whitespace only
Removed
ImagemapTokenno longer overrides thelinksgetter
2024-03-05
Fixed
- Ignore most invalid Wikitext syntax nested in a
PreTokenwhen linting
2024-03-03
Added
- New getter
FileToken.extension
Fixed
DdTokenis now correctly parsed whenQuoteTokenis present in the same line- Improved
ImageParameterTokenvalidation for different file extensions - Ignore incomplete Wikitext syntax in
beforeandafterattributes of a<choose>extension tag when linting
2024-02-29
Added
- New property
rulesof the interfaceParser
Fixed
Changed
filterin thestyleattribute is no longer reported as an error
Removed
- Token type aliases have been malfunctioning since v1.4.3, and are now removed
2024-02-22
Added
- Auto-fix and suggestions for selected linting errors
Removed
AstElement.prototype.echomethod
2024-02-12
Added
- New property
ruleof the interfaceLintError
2024-02-04
Added
- New category of linting errors: inconsistent table layout
Fixed
- Inconsistent output from
AttributesToken.prototype.print
Changed
HtmlToken.prototype.printandImageParameterToken.prototype.printdo not differentiate invalid tokens any moreHtmlToken.prototype.textnow treats void tags as self-closing tags
2024-01-31
Added
- New field
rangein the return value ofAstElement.prototype.json
Fixed
- Missing type declarations for
ExtLinkToken.firstChildandConverterToken.firstChildare added
2024-01-29
Fixed
AstText.prototype.lintno longer reports warnings for matched single brace or bracket
2024-01-27
Added
- New category of linting errors:
<ref>or external links without specified text in anchors - New preset configuration
enwikifor English Wikipedia
Fixed
Changed
- Reported duplicated categories do not need to be child nodes of the same parent node
- Better recognition of bracket pair (
[]) that actually breaks theExtLinkToken
2024-01-23
Added
- Linting errors for
LinkTokenare now also reported fromCategoryTokenandFileTokenwhere applicable - New category of linting errors: duplicated categories, and bold in headers
Fixed
- Type declarations
2024-01-22
Added
- New categories of linting errors, including obsolete HTML tags and attributes, internal links in external links, and unmatched apostrophes inside a header
- New properties for
QuoteToken:boldanditalic
Fixed
Parser.isInterwikinow returnsnullif no interwiki prefix is found from the configuration- Title starting with multiple colons is invalid
2024-01-21
Changed
AstElement.prototype.jsonnow recordsAstTextas an object instead of a plain string, and some getter properties includingArgToken.default,HeadingToken.level,HtmlToken.closing,HtmlToken.selfClosing,ParameterToken.anon,TableToken.closed, andTdToken.subtypeare now supported
2024-01-19
Fixed
- Trailing whitespace as the last
ConverterRuleTokenis now allowed
Changed
- Double pipes in
TdTokenwill now report an'error'instead of a'warning'
2024-01-17
Changed
AttributesToken.prototype.setAttrnow also accepts an attribute object as argument
2024-01-16
Fixed
- Case-insensitive magic variables like
server startIndexandendIndexofMagicLinkToken.prototype.lint
2024-01-15
Fixed
- A case-sensitive parser function requires a colon after the function name
- External links like
[[//xyz]] - Invalid closing void HTML tag except
</br>
2024-01-15
Added
- Reporting unclosed
IncludeToken - Reporting lonely
<onlyinclude>,<noinclude>and<includeonly> - Reporting errors such as
<pre>insidePreToken
2024-01-14
Fixed
- Parsing an illegal template name, e.g.,
{{#if:{{<}}}}
2024-01-11
Changed
- Ingoring
'http'in tag attribute values when linting
Removed
excerptfield inLintError
2024-01-04
Fixed
- Allowing
<and>in the fragment of an internal link
Changed
HiddenTokenchild nodes ofGalleryTokenare replaced byNoincludeToken- The pseudo selector
:invalidnow reports invalidImageParameterTokeninstead of redundant child nodes ofArgToken
Removed
- Pseudo selectors
:read-onlyand:read-write
2024-01-03
Fixed
- Fully localized message in
LintError
2023-12-19
Fixed
- Magic words
!and=are now required in parser configurations
2023-12-18
Added
- New methods
AstText.prototype.escape,ParameterToken.prototype.escapeandMagicLinkToken.prototype.escape
Fixed
- Removing unexpected
removeandinsertevents dispatched byToken.prototype.safeReplaceWith {{!}}and{{=}}can be part of an external link now
Changed
- Inserting a child node is now forbidden
2023-12-16
Fixed
- Fixing
Token.prototype.sectionssince v1.1.2
Changed
Token.prototype.findEnclosingHtmlnow returns anAstRangeobject
2023-12-13
Changed
- Token type
converter-rule-noconvertnow regarded asconverter-rule-to - Anonymous parameters will remain anonymous after
ParameterToken.prototype.setValue
Removed
HeadingToken.nameproperty
2023-12-11
Changed
getAttras the preferred method for attribute selector
2023-12-11
Added
- New properties and methods for
Titleobjects:extension,toSubjectPage,toTalkPage,isTalkPage,toBasePage,toRootPage
Fixed
- Wrapping the text after the last
</onlyinclude>in aNoincludeToken - Replacing remaining spaces in
Title.titleproperty with underscores AstRangenow maintains its content afterinsertNode,deleteContents,extractContentsandcloneContentsmethods
Changed
startContainerandendContainerproperties ofAstRangemust be siblings now
Removed
AstRange.prototype.intersectsNodemethod
2023-12-05
First TypeScript version