Jump to content

Module:Citation/CS1/Configuration: Difference between revisions

Synch from sandbox;
m>Trappist the monk
(Synch from sandbox;)
m>Trappist the monk
(Synch from sandbox;)
Line 320: Line 320:
table data in an arbitrary order.  Here, we want to process the table from top to bottom because the entries at
table data in an arbitrary order.  Here, we want to process the table from top to bottom because the entries at
the top of the table are also found in the ranges specified by the entries at the bottom of the table.
the top of the table are also found in the ranges specified by the entries at the bottom of the table.
This list contains patterns for templates like {{'}} which isn't an error but transcludes characters that are
invisible.  These kinds of patterns must be recognized by the functions that use this list.
Also here is a pattern that recognizes stripmarkers that begin and end with the delete characters.  The nowiki
stripmarker is not an error but some others are because the parameter values that include them become part of the
template's metadata before stripmarker replacement.


]]
]]
Line 325: Line 332:
local invisible_chars = {
local invisible_chars = {
{'replacement', '\239\191\189'}, -- U+FFFD, EF BF BD
{'replacement', '\239\191\189'}, -- U+FFFD, EF BF BD
{'apostrophe', '‍\226\128\138\039\226\128\139'}, -- apostrophe template: ‍ hair space ' zero-width space; not an error
{'apostrophe', '\226\128\138\039\226\128\139'}, -- apostrophe template: hair space ' zero-width space; (as of 2015-12-11) not an error
{'zero width joiner', '\226\128\141'}, -- U+200D, E2 80 8D
{'zero width space', '\226\128\139'}, -- U+200B, E2 80 8B
{'zero width space', '\226\128\139'}, -- U+200B, E2 80 8B
{'hair space', '\226\128\138'}, -- U+200A, E2 80 8A
{'soft hyphen', '\194\173'}, -- U+00AD, C2 AD
{'soft hyphen', '\194\173'}, -- U+00AD, C2 AD
{'horizontal tab', '\009'}, -- U+0009 (HT), 09
{'horizontal tab', '\009'}, -- U+0009 (HT), 09
{'line feed', '\010'}, -- U+0010 (LF), 0A
{'line feed', '\010'}, -- U+0010 (LF), 0A
{'carriage return', '\013'}, -- U+0013 (CR), 0D
{'carriage return', '\013'}, -- U+0013 (CR), 0D
{'C0 control', '[\000-\008\011\012\014-\031\127]'}, -- U+0000–U+001F (NULL–US), 00–1F, and U+001F (DEL), 7F (except HT, LF, CR (09, 0A, 0D))
-- {'nowiki stripmarker', '\127UNIQ%-%-nowiki%-[%a%d]+%-QINU\127'}, -- nowiki stripmarker; not an error
{'stripmarker', '\127UNIQ%-%-(%a+)%-[%a%d]+%-QINU\127'}, -- stripmarker; may or may not be an error; capture returns the stripmaker type
{'delete', '\127'}, -- U+007F (DEL), 7F; must be done after stripmarker test
{'C0 control', '[\000-\008\011\012\014-\031]'}, -- U+0000–U+001F (NULL–US), 00–1F (except HT, LF, CR (09, 0A, 0D))
{'C1 control', '[\194\128-\194\159]'}, -- U+0080–U+009F (XXX–APC), C2 80 – C2 9F
{'C1 control', '[\194\128-\194\159]'}, -- U+0080–U+009F (XXX–APC), C2 80 – C2 9F
{'Specials', '[\239\191\185-\239\191\191]'}, -- U+FFF9-U+FFFF, EF BF B9 – EF BF BF
{'Specials', '[\239\191\185-\239\191\191]'}, -- U+FFF9-U+FFFF, EF BF B9 – EF BF BF
Line 562: Line 576:
hidden = false },
hidden = false },
invisible_char = {
invisible_char = {
message = '$1 character in $2 at position $3',
message = '$1 in $2 at position $3',
anchor = 'invisible_char',
anchor = 'invisible_char',
category = 'CS1 errors: invisible characters',
category = 'CS1 errors: invisible characters',
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.