1# Known Issues
2
3 * Perl formatting is really crappy. Partly because the author is lazy and partly
4   because Perl is [hard](http://www.perlmonks.org/?node_id=663393) to parse.
5 * On some browsers, `<code>` elements with newlines in the text which use CSS
6   to specify `white-space:pre` will have the newlines improperly stripped if
7   the element is not attached to the document at the time the stripping is done.
8   Also, on IE6, all newlines will be stripped from `<code>` elements because
9   of the way IE6 produces `innerHTML`. Workaround: use `<pre>` for code with
10   newlines.
11
12# Change Log
13
14## 29 March 2007
15
16 * Added [tests](https://raw.githack.com/google/code-prettify/master/tests/prettify_test.html#php)
17   for PHP support to address issue [#3](https://github.com/google/code-prettify/issues/3).
18 * Fixed bug [#6](https://github.com/google/code-prettify/issues/6): `prettyPrintOne`
19   was not halting. This was not reachable through the normal entry point.
20 * Fixed bug [#4](https://github.com/google/code-prettify/issues/4): recursing into a
21   script block or PHP tag that was not properly closed would not silently drop the content.
22   ([test](https://raw.githack.com/google/code-prettify/master/tests/prettify_test.html#js_script))
23 * Fixed bug [#8](https://github.com/google/code-prettify/issues/8): was eating tabs
24   ([test](https://raw.githack.com/google/code-prettify/master/tests/prettify_test.html#issue8))
25 * Fixed entity handling so that the caveat
26
27   > Caveats: please properly escape less-thans. `x&lt;y` instead of `x<y`,
28   > and use `"` instead of `&quot;` for string delimiters.
29
30   is no longer applicable.
31 * Added *noisefree*'s C# patch [#7](https://github.com/google/code-prettify/issues/7)
32 * Added a [distribution](http://google-code-prettify.googlecode.com/files/prettify-small.zip)
33   that has comments and whitespace removed to reduce download size from 45.5kB
34   to 12.8kB.
35
36## 4 Jul 2008
37
38 * Added [#17](https://github.com/google/code-prettify/issues/17) language specific
39   formatters that are triggered by the presence of a `lang-<language-file-extension>`
40 * Fixed bug [#29](https://github.com/google/code-prettify/issues/29): python
41   handling of `'''string'''`
42 * Fixed bug: `/` in regex `[charsets] should not end regex`
43
44## 5 Jul 2008
45
46 * Defined language extensions for Lisp and Lua
47
48## 14 Jul 2008
49
50 * Language handlers for F#, OCAML, SQL
51 * Support for `nocode` spans to allow embedding of line numbers and code
52   annotations which should not be styled or otherwise affect the tokenization
53   of prettified code. See the issue [#22](https://github.com/google/code-prettify/issues/22)
54   [testcase](https://raw.githack.com/google/code-prettify/master/tests/prettify_test.html#issue22).
55
56## 6 Jan 2009
57
58 * Language handlers for Visual Basic, Haskell, CSS, and WikiText
59 * Added `.mxml` extension to the markup style handler for
60   Flex [MXML files](http://en.wikipedia.org/wiki/MXML).
61   See issue [#37](https://github.com/google/code-prettify/issues/37).
62 * Added `.m` extension to the C style handler so that Objective C source files
63   properly highlight. See issue [#58](https://github.com/google/code-prettify/issues/58).
64 * Changed HTML lexer to use the same embedded source mechanism as the wiki
65   language handler, and changed to use the registered CSS handler for STYLE
66   element content.
67
68## 21 May 2009
69
70 * Rewrote to improve performance on large files.
71   See [benchmarks](http://mikesamuel.blogspot.com/2009/05/efficient-parsing-in-javascript.html).
72 * Fixed bugs with highlighting of Haskell line comments, Lisp number literals,
73   Lua strings, C preprocessor directives, newlines in Wiki code on Windows, and
74   newlines in IE6.
75
76## 14 August 2009
77
78 * Fixed prettifying of `<code>` blocks with embedded newlines.
79
80## 3 October 2009
81
82 * Fixed prettifying of XML/HTML tags that contain uppercase letters.
83
84## 19 July 2010
85
86 * Added support for line numbers. Bug [#22](https://github.com/google/code-prettify/issues/22)
87 * Added YAML support. Bug [#123](https://github.com/google/code-prettify/issues/123)
88 * Added VHDL support courtesy *Le Poussin*.
89 * IE performance improvements. Bug [#102](https://github.com/google/code-prettify/issues/102)
90   courtesy *jacobly*.
91 * A variety of markup formatting fixes courtesy *smain* and *thezbyg*.
92 * Fixed copy and paste in IE 6, 7, 8.
93 * Changed output to use `&#160;` instead of `&nbsp;` so that the output works
94   when embedded in XML. Bug [#108](https://github.com/google/code-prettify/issues/108).
95
96## 7 September 2010
97
98 * Added support for coffeescript courtesy *Cezary Bartoszuk*.
99
100## 4 March 2011
101
102 * Added a [themes gallery](https://raw.githack.com/google/code-prettify/master/styles/index.html)
103   to showcase contributed styles.
104 * Added support for XQuery courtesy *Patrick Wied*, Nemerle courtesy *Zimin A.V.*,
105   and Latex support courtesy *Martin S*.
106
107## 29 March 2011
108
109 * Fixed IE newline issues, and copying/pasting of prettified source code from IE.
110   This required significant internal changes but involves no API changes.
111   **Caveat**: `prettyPrintOne` injects the HTML passed to it into a `<pre>` element.
112   If the HTML comes from a trusted source, this may allow XSS. Do not do this.
113   This should not be a problem for existing apps since the standard usage is to
114   rewrite the HTML and then inject it, so anyone doing that with untrusted HTML
115   already has an XSS vulnerability. If you sanitize and prettify HTML from an
116   untrusted source, sanitize first.
117
118## 4 February 2013
119
120 * Language handlers for Dart, Erlang, Mumps, TCL, R, S., and others
121 * Bug fix: VB REM style comments.
122 * Bug fix: CSS color literals / ID selector confusion.
123 * Bug fix: IE8 line breaks.
124
125## 24 February 2013
126
127 * Added a one script autoload&run mechanism and a way to embed hints in
128   processing instructions/comments. See
129   [example](https://raw.githack.com/google/code-prettify/master/examples/quine.html).
130
131## 4 March 2013
132
133 * Matlab language handler courtesy *Amro³*
134
135## 28 Apr 2015
136
137 * Migrated to Github
138