forked from torchbox/django-pattern-library
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Rendered code view in Template output (#2)
- Loading branch information
1 parent
13e6632
commit 34a6ff9
Showing
9 changed files
with
458 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 10 additions & 6 deletions
16
pattern_library/static/pattern_library/src/js/components/syntax-highlighting.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
import hljs from 'highlight.js/lib/core'; | ||
import django from 'highlight.js/lib/languages/django'; | ||
import yaml from 'highlight.js/lib/languages/yaml'; | ||
import hljs from "highlight.js/lib/core"; | ||
import django from "highlight.js/lib/languages/django"; | ||
import yaml from "highlight.js/lib/languages/yaml"; | ||
import md from "highlight.js/lib/languages/markdown"; | ||
import xml from "highlight.js/lib/languages/xml"; | ||
|
||
export default function() { | ||
hljs.registerLanguage('django', django); | ||
hljs.registerLanguage('yaml', yaml); | ||
export default function () { | ||
hljs.registerLanguage("django", django); | ||
hljs.registerLanguage("yaml", yaml); | ||
hljs.registerLanguage("md", md); | ||
hljs.registerLanguage("xml", xml); | ||
hljs.highlightAll(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.