User:Brighterorange/punctuationtest

From Wikipedia, the free encyclopedia

Notice This (user sub)page is test input for the Autopunctuation script. It contains many errors that the script is supposed to find. Please feel free to test the script on this page, but don't save it, and don't make any fixes manually!

Contents

[edit] Spelling (puSPELL)

We test for a few common spelling errors. If you write "seperately" or "seperate" then we'll fix that. How embarassing!

[edit] Commas (puCOMMA)

If you have commas normally, then nothing happens.

If you have commas with no spaces,then we fix.

If you have too many spaces , then we also fix.

Also this strange combination ,is fixed too.

But inside a link like http://news.agency/article/2007,a100,b1,,c3.stm or [1] or named link we shouldn't add[2] spaces,although after such links we still should.

[edit] Semicolons (puSEMICOLON)

We treat semicolons just like commas;there must be a space after and not before.

Semicolon is also used for HTML entities ; this means that we should ignore it in certain scenarios—like when used to create dashes.

[edit] En dashes (puENDASH)

(missing test cases for en dashes)

Don't miss the case where there's a reference with something like: B.L. Ullman (1918-03). "Daylight saving in ancient Rome". The Classical Journal 13 (6): 450-451. 


We should also avoid en dashes within links like http://news.agency/article/2007-2008-1-2-3.stm or [3] or named link we shouldn't convert to en dashes[4] but 10-20 doctors agree that we should still do it after such links. Links to pages like 1956-57 in English football shouldn't get en dashes, even if they are piped, but if the pipe part contains a range like 1956-1957, then they should. Same goes for templates, eg. Template:Example 10-20 or Template:Example 10-20; however, the template arguments themselves should be en dashed!

[edit] Link syntax (puLINKSPACE)

The only thing we do with links is remove trailing spaces . Those should never be there. We don't touch regular links.

Also the syntax [[Category:Sandbox| ]] is a common idiom used to use the space character as a sort key in the category, which makes it show up first in the list. We filter this out.

[edit] Born (puBORN)

Some other encyclopedias use the abbreviation "b." for "born", which means that we sometimes see (b. 1979) in biographical articles. The manual of style endorses (born 1979). But we shouldn't touch, say, "A.b.c.'s" or "slab."

[edit] Decades

Sometimes people write 1980's instead of 1980s. They shouldn't do that. But we shouldn't touch something like 20's (or should we?) or 1980'sum'2001.

[edit] Parentheses

A common error is to forget space (of whatever sort)after a closing parenthesis. Sometimes people put stray spaces (who knows why ) before closing parentheses too. But there needn't be space unless the next thing is a word (so we should detect this).

[edit] XHTML

Empty tags in XHTML should have a slash before the closing >. Probably the most common tag in Wikipedia articles is <br/>. So we should turn linebreaks without
the
slash
into proper XHTML. This should happen even if the TAGS
ARE
CAPITALIZED.

[edit] City-State (puCITYSTATE)

Brighterorange wishes there weren't false positives for images ending in Pittsburgh, Pennsylvania
Brighterorange wishes there weren't false positives for images ending in Pittsburgh, Pennsylvania

It's common to see New York, New York or Pittsburgh, Pennsylvania when Pittsburgh, Pennsylvania looks nicer and is more usable. Even with the {{city-state}} template it's a pain to do this, though. We can transform this automatically for US states. Since it currently uses the pipe trick, it does not work properly in references—so be careful![1] Also, false positives for images and category links: [[category:Pittsburgh, Pennsylvania]] Additionally, when linking to cities in Georgia, like Athens, Georgia, we need to link to Georgia (U.S. state) since Georgia is a disambiguation page.

[edit] Reference tags (puREF)

According to the manual of style for references, references should follow punctuation (other than dashes) unless a smaller particle (for example, an individual term) is what the reference binds to[2]. A reference can take many forms[3]; like it can have parameters[2] or be XHTML empty[2]. There shouldn't be any space before references because that may cause the reference to wrap to the next line, [2] and the same is true if there are multiple references in a row [2][2] [2]. Also because references are long in code, sometimes people accidentally put punctuation both before and after the reference! [4]! Sometimes people don't put space after a reference,[5]which looks weird.

Finally, it's surprisingly common to leave off punctuation entirely at the end of a line after a reference[6]



  1. ^ So look what happens with Boston, Massachusetts.
  2. ^ a b c d e f g Wikipedia:Footnotes
  3. ^ form
  4. ^ Don't screw up!
  5. ^ mistake
  6. ^ [[WP:.]]