1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-08-11 00:24:12 +02:00

Add typescript types for patterns

This commit is contained in:
Phuoc Nguyen
2019-11-24 23:36:43 +07:00
parent 154a61de91
commit 6d3d9da384
88 changed files with 146 additions and 93 deletions

View File

@@ -3,7 +3,7 @@ import html from 'highlight.js/lib/languages/xml';
hljs.registerLanguage('html', html);
const highlight = (input, language) => {
const highlight = (input: string, language: string) => {
const lang = language || 'html';
const { value } = hljs.highlight(lang, input);
const highlighted = value.replace('&', '&').trim();