In the debug console, the following code:
tostring( mw.html.create( 'h2' ) )
Produces the error "Lua error in mw.html.lua at line 368: Invalid tag name: h2." This is due to the over-zealous Lua pattern at line 78 of mw.html.lua [1]
This should probably be changed from:
return s:match( '^[a-zA-Z]+$' )
To:
return s:match( '^[a-zA-Z]+[0-9]*$' )
Or as it seems that h1 to h6 are the only tags containing numbers, perhaps this could be:
return s:match( '^[a-zA-Z]+$' ) or s:match( '^h[1-6]$' )
Version: unspecified
Severity: normal