Skip to content

Commit a007797

Browse files
committed
Update README.md
1 parent 59f905d commit a007797

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

README.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# highlightjs-line-numbers.js [![version](http://img.shields.io/badge/release-v2.2.0-brightgreen.svg?style=flat)](https://github.com/wcoder/highlightjs-line-numbers.js/archive/master.zip)
1+
# highlightjs-line-numbers.js [![npm](https://img.shields.io/npm/v/highlightjs-line-numbers.js.svg)](https://www.npmjs.com/package/highlightjs-line-numbers.js) ![npm](https://img.shields.io/npm/dw/highlightjs-line-numbers.js.svg)
22

33
Highlight.js line numbers plugin.
44

@@ -18,7 +18,7 @@ npm install highlightjs-line-numbers.js
1818

1919
#### Getting the library from CDN
2020
```html
21-
<script src="//cdnjs.cloudflare.com/ajax/libs/highlightjs-line-numbers.js/2.2.0/highlightjs-line-numbers.min.js"></script>
21+
<script src="//cdnjs.cloudflare.com/ajax/libs/highlightjs-line-numbers.js/2.3.0/highlightjs-line-numbers.min.js"></script>
2222
```
2323

2424
## Usage
@@ -40,45 +40,45 @@ hljs.initLineNumbersOnLoad();
4040
Here’s an equivalent way to calling `initLineNumbersOnLoad` using jQuery:
4141
```js
4242
$(document).ready(function() {
43-
$('code.hljs').each(function(i, block) {
44-
hljs.lineNumbersBlock(block);
45-
});
43+
$('code.hljs').each(function(i, block) {
44+
hljs.lineNumbersBlock(block);
45+
});
4646
});
4747
```
4848

4949
If your needs cool style, add styles by taste:
5050
```css
5151
/* for block of numbers */
5252
td.hljs-ln-numbers {
53-
-webkit-touch-callout: none;
54-
-webkit-user-select: none;
55-
-khtml-user-select: none;
56-
-moz-user-select: none;
57-
-ms-user-select: none;
58-
user-select: none;
59-
60-
text-align: center;
61-
color: #ccc;
62-
border-right: 1px solid #CCC;
63-
vertical-align: top;
64-
padding-right: 5px;
65-
66-
/* your custom style here */
53+
-webkit-touch-callout: none;
54+
-webkit-user-select: none;
55+
-khtml-user-select: none;
56+
-moz-user-select: none;
57+
-ms-user-select: none;
58+
user-select: none;
59+
60+
text-align: center;
61+
color: #ccc;
62+
border-right: 1px solid #CCC;
63+
vertical-align: top;
64+
padding-right: 5px;
65+
66+
/* your custom style here */
6767
}
6868

6969
/* for block of code */
7070
td.hljs-ln-code {
71-
padding-left: 10px;
71+
padding-left: 10px;
7272
}
7373
```
7474

7575
## Options
7676

7777
After version 2.1 plugin has optional parameter `options` - for custom setup.
7878

79-
name | type | default value | description
80-
-----|------|---------------|------------
81-
singleLine | boolean | false | enable plugin for code block with one line
79+
name | type | default value | description
80+
-----------|---------|---------------|-----------------------
81+
singleLine | boolean | false | enable plugin for code block with one line
8282

8383
#### Examples of using
8484

@@ -93,4 +93,4 @@ hljs.lineNumbersBlock(myCodeBlock, myOptions);
9393
```
9494

9595
---
96-
&copy; 2017 Yauheni Pakala | MIT License
96+
&copy; 2018 Yauheni Pakala | MIT License

0 commit comments

Comments
 (0)