< Markup spec < BNF

EBNF grammar project

Markup spec

  • ANTLR
  • BNF
    • Article title
    • Article
    • Noparse-block
    • Links
    • Magic links
    • Special block
    • Inline text
    • Fundamental elements

Magic links are words that may appear within <wiki-text> that are automatically converted to external links without any special markup being required by the person writing the page.

<magic-link>	::= <isbn> | <rfc-number> | <pmid-number>

Note that all character-literals on this page are case sensitive (i.e. upper-case characters in the definitions on this page MUST be written in upper case in the markup).

ISBN numbers

See Manual:ISBN

<isbn>		::= "ISBN" (" "+) <isbn-number> ?(non-word-character /\b/)
<isbn-number>	::= ("97" ("8" | "9") (" " | "-")?) (DIGIT (" " | "-")?) {9} (DIGIT | "X" | "x")

Examples:

  • ISBN 1234567890
  • ISBN 123456789x
  • ISBN 1 2 3-4-5 6789 X
  • ISBN 978-9999999999

Counter-examples:

  • ISBN 12345678901 (not followed by non-word character )
  • ISBN 123456789 (too short)
  • ISBN 97-81234567890 (dashes not allowed in prefix)
  • ISBN1234567890 (no spaces)

RFCs

See Manual:RFC

<rfc-number>	::= "RFC" <spaces> <digits>

PubMed IDs

<pmid-number>	::= "PMID" <spaces> <digits>
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.