Skip to content

Commit f42d025

Browse files
author
Ram swaroop
committed
added line nos to code snippets
1 parent 796e42e commit f42d025

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

_posts/2015-05-21-declarations.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class, or as a class member, however they must not be declared within a method.
9494

9595
#### An enum outside a class:
9696

97-
{% highlight java %}
97+
{% highlight java linenos %}
9898

9999
enum CoffeeSize { BIG, HUGE, OVERWHELMING } // this cannot be
100100
// private or protected
@@ -118,7 +118,7 @@ with only the __public or default modifier__, just like a class (non-inner)._
118118

119119
#### An enum inside a class:
120120

121-
{% highlight java %}
121+
{% highlight java linenos %}
122122

123123
class Coffee2 {
124124
enum CoffeeSize {BIG, HUGE, OVERWHELMING }; // <-- semicolon is optional
@@ -145,7 +145,7 @@ enumerated CoffeeSize types are actually __instances of CoffeeSize__. In other w
145145
is of type CoffeeSize. Think of an enum as a kind of class, that looks something
146146
(but not exactly) like this:
147147

148-
{% highlight java %}
148+
{% highlight java linenos %}
149149

150150
// conceptual example of how you can think
151151
// about enums
@@ -196,7 +196,7 @@ somehow have the `OVERWHELMING` constant override the `getLidCode()` method.
196196

197197
The below code snippet describes two of the above preceding points:
198198

199-
{% highlight java %}
199+
{% highlight java linenos %}
200200

201201
enum CoffeeSize {
202202
BIG(8),

_posts/2015-05-22-access-control.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ subclass **if the subclass is in a different package** from the parent class.
2424

2525
The following code snippet makes it clear:
2626

27-
{% highlight java %}
27+
{% highlight java linenos %}
2828
package certification;
2929
public class Parent {
3030
protected int x = 9; // protected access

_sass/external/_syntax.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,5 @@
6161
.vg { color: #008080 } /* Name.Variable.Global */
6262
.vi { color: #008080 } /* Name.Variable.Instance */
6363
.il { color: #009999 } /* Literal.Number.Integer.Long */
64+
.lineno { opacity:.2; color: #cccccc;-webkit-transition: opacity .5s linear; transition: opacity .5s linear;} /* Line nos */
65+
.highlight:hover .lineno { opacity: 1 } /* Show line nos on hover */

0 commit comments

Comments
 (0)