Please turn on javascript in your browser to play chess.
Site Ideas Forum

Site Ideas Forum

  1. 22 Aug '10 14:58 / 1 edit
    In various puzzle answers people have written a program to derive the answer and want to show what it is. The problems with this are:

    a) Programs in languages such as Perl may have sequences of characters that are changed to something else (eg a smiley) by the RHP posting reformatter, recognised as tags and cause unwanted reformatting, or are thrown away entirely.

    b) Indentation is very helpful when reading compound statements in many programming languages and is actually a crucial component of the language in Python. However it is almost impossible to achieve line indentation in a RHP posting because the reformatter collapses consecutive whitespace.

    c) Often programs look better in a constant width font, such as Courier, but it is not possible to specify such a font in a posting.

    My suggestion is that the editor is changed so that text within a [code] [/code] tag does not have whitespace concatenated, has no substitution of smiley characters or recognition of interior tags, and should be shown in a constant width font.

    Exterior tags should ideally still affect such a section, eg if there is a bold tag par surrounding a [code] tag par then the code should be shown in bold, however is the bold tag pair is within the [code] tag pair then the exact text of the tags should be shown.

    This feature may also come in useful when someone is trying to achieve tabular formatting in a posting to make what is posted clearer. Currently nice tabular formatting is impossible because consecutive whitespace is removed, and the font is not constant width. Because of this, people currently have to resort to inserting lines of full stops or something to get the formatting more or less right in a table.