Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit a247a12

Browse files
committed
chore: update docs [skip ci]
1 parent 337c64e commit a247a12

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

README.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ Vue diff viewer plugin
2121
<img src="https://user-images.githubusercontent.com/25652218/104695609-60533c80-5750-11eb-85dd-0e7d0d79d5ac.png" alt="screenshot" style="max-width:100%;">
2222

2323
You can see the difference between the two codes with the `vue-diff` plugin.
24-
This plugin dependent on <a href="https://github.com/kpdecker/jsdiff">diff</a> and <a href="https://github.com/highlightjs/highlight.js/">highlight.js</a>, shows similar results to other diff viewers (e.g., Github Desktop).
25-
Please see the <a href="https://hoiheart.github.io/vue-diff/demo/index.html" target="_blank" style="font-size: 1.2em; text-decoration: underline;">demo</a>
24+
This plugin dependent on <a href="https://github.com/kpdecker/jsdiff">diff</a> and <a href="https://github.com/highlightjs/highlight.js/">highlight.js</a>, shows similar results to other diff viewers (e.g., Github Desktop).
25+
Here is the <a href="https://hoiheart.github.io/vue-diff/demo/index.html" target="_blank" style="font-size: 1.2em; text-decoration: underline;">demo</a>
2626

2727
## Features
2828

2929
* [x] Support split / unified mode
30-
* [x] Support some languages and can be extended
30+
* [x] Support multiple languages and can be extended
3131
* [X] Support two themes (dark / light) and can be customized
3232
* [ ] Support IE11 (IE 11 support for Vue@3 is still pending)
3333

@@ -56,7 +56,7 @@ app.use(VueDiff, {
5656

5757
| name | type | detault | description |
5858
|- | - | - | - |
59-
| componentName | `string` | `'Diff'` | Global diff component name |
59+
| componentName | `string` | `Diff` | Global diff component name |
6060

6161
## Usage diff viewer
6262

@@ -119,13 +119,19 @@ npm install highlight.js
119119

120120
`vue-diff` supports the following languages and can be extended through <a href="https://github.com/highlightjs/highlight.js/#es6-modules">highlight.js language registration.</a>
121121

122+
### Default supported languages and values
123+
122124
* `css`
123-
* `xml`
124-
* `markdown`
125-
* `javascript`
125+
* `xml`: `xml`, `html`, `xhtml`, `rss`, `atom`, `xjb`, `xsd`, `xsl`, `plist`, `svg`
126+
* `markdown`: `markdown`, `md`, `mkdown`, `mkd`
127+
* `javascript`: `javascript`, `js`, `jsx`
126128
* `json`
127-
* `plaintext`
128-
* `typescript`
129+
* `plaintext`: `plaintext`, `txt`, `text`
130+
* `typescript`: `typescript`, `ts`
131+
132+
```bash
133+
npm install highlight.js
134+
```
129135

130136
```ts
131137
import VueDiff from 'vue-diff'
@@ -137,4 +143,6 @@ import yaml from 'highlight.js/lib/languages/yaml'
137143
VueDiff.hljs.registerLanguage('yaml', yaml)
138144

139145
app.use(VueDiff)
140-
```
146+
```
147+
148+
> <a href="https://github.com/highlightjs/highlight.js/blob/master/SUPPORTED_LANGUAGES.md">Check supported languages of Highlight.js</a>

0 commit comments

Comments
 (0)