Fix API output formatting (change lines delimited with * as bold)
authorWaldir Pimenta <waldir@email.com>
Wed, 16 Jan 2013 19:31:37 +0000 (19:31 +0000)
committerWaldir <waldir@email.com>
Wed, 20 Feb 2013 14:48:44 +0000 (14:48 +0000)
commita943d0da14f1ff4435409171a32f03cb958025ad
tree4102d58ac71569acf2f1ed0557438f2fb1863274
parent5db75ef6a4fedb5baeb1acec059966b5652209d6
Fix API output formatting (change lines delimited with * as bold)

Problem: on API documentation pages, lines delimited with asterisks
are automatically converted to bold. However, some lines aren't,
such as the one with the url in the main header of the root API page:
https://en.wikipedia.org/w/api.php

Not only this is breaks the standard formatting for module headers, etc,
but if the font used by the browser for monospaced text
doesn't preserve character width between bold and regular weight
(which it should), any layout structures will break.
Example: http://i.imgur.com/PVh6i.png

The regex that applies bold to the lines starting and ending in *
doesn't accept < and > inside the string,
but these are added by the url-formatting regex.
Simply changing the order of these operations fixes the issue.

Note: this change also removes the regex applying italics
      to lines in the $ ... $ form, as suggested by Anomie and Yurik
      in code review comments.

Change-Id: I7173f812bebb8a722fefdaa6cce9fcd554c82c84
includes/api/ApiFormatBase.php