Skip to content
This repository was archived by the owner on Apr 22, 2020. It is now read-only.

Commit a25617a

Browse files
author
mikesamuel
committed
added testcase for issue 45
1 parent 781168e commit a25617a

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

README.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,9 @@ <h3>Which languages does it work for?</h3>
7575
><code>lang-lisp.js</code></a>.</p>
7676

7777
<p>If you'd like to add an extension for your favorite language, please
78-
look at lang-lisp.js and file an <a href="http://code.google.com/p/google-code-prettify/issues/list">issue</a> including your language extension,
79-
and a testcase.</p>
78+
look at lang-lisp.js and file an
79+
<a href="http://code.google.com/p/google-code-prettify/issues/list"
80+
>issue</a> including your language extension, and a testcase.</p>
8081

8182
<h3>How do I specify which language my code is in?</h3>
8283
<p>You don't need to specify the language since <code>prettyprint()</code>

tests/prettify_test.html

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,13 @@ <h1>Bug 42 - Lisp Syntax Highlighting</h1>
748748
)
749749
</pre>
750750

751+
<h1>Bug 45 - Square brackets in strings</h1>
752+
<pre class="prettyprint" id="issue45">
753+
throw new RuntimeException("Element [" + element.getName() +
754+
"] missing attribute.");
755+
variable++;
756+
</pre>
757+
751758
</body>
752759

753760
<script type="text/javascript">
@@ -1710,7 +1717,11 @@ <h1>Bug 42 - Lisp Syntax Highlighting</h1>
17101717
'&nbsp; `END`LIT\'`END`OPN(`END`KWDlambda`END`PLN `END`OPN(`END`CLO)`END`PLN<br>' +
17111718
'&nbsp; &nbsp; &nbsp;`END`OPN(`END`PLNturn-on-auto-fill`END`CLO)`END`PLN<br>' +
17121719
'&nbsp; &nbsp;`END`CLO)`END`PLN<br>' +
1713-
'`END`CLO)`END')
1720+
'`END`CLO)`END'),
1721+
issue45: (
1722+
'`PLN &nbsp;`END`KWDthrow`END`PLN `END`KWDnew`END`PLN `END`TYPRuntimeException`END`PUN(`END`STR"Element ["`END`PLN `END`PUN+`END`PLN element`END`PUN.`END`PLNgetName`END`PUN()`END`PLN `END`PUN+`END`PLN <br>' +
1723+
'&nbsp; &nbsp; `END`STR"] missing attribute."`END`PUN);`END`PLN<br>' +
1724+
'&nbsp; variable`END`PUN++;`END')
17141725
};
17151726

17161727

0 commit comments

Comments
 (0)