mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-07-25 16:19:44 +02:00
Small layout updates (#46)
This commit is contained in:
parent
a4031f151f
commit
529aca5e29
12 changed files with 49 additions and 9 deletions
|
@ -1,6 +1,7 @@
|
|||
import hljs from 'highlight.js/lib/highlight';
|
||||
import javascript from 'highlight.js/lib/languages/javascript';
|
||||
import xml from 'highlight.js/lib/languages/xml';
|
||||
import json from 'highlight.js/lib/languages/json';
|
||||
import style from 'highlight.js/styles/atom-one-dark.css';
|
||||
|
||||
/**
|
||||
|
@ -12,12 +13,13 @@ export default class CodeStyler {
|
|||
* @param {string} selector - CSS selector for code blocks
|
||||
* @param {string[]} languages - list of languages to highlight, see hljs.listLanguages()
|
||||
*/
|
||||
constructor({selector, languages = [ 'javascript', 'xml' ]}) {
|
||||
constructor({selector, languages = [ 'javascript', 'xml', 'json' ]}) {
|
||||
this.codeBlocksSelector = selector;
|
||||
this.languages = languages;
|
||||
this.langsAvailable = {
|
||||
javascript,
|
||||
xml
|
||||
xml,
|
||||
json
|
||||
};
|
||||
|
||||
this.init();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue