mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-04-27 12:34:38 +00:00
Fix problem with highlight plugin language brushes
TiddlyWiki passes the MIME type of the tiddler to highlight.js as the "language brush", but it turns out that highlight.js doesn't actually understand MIME types. This commit introduces a configuration mapping between common MIME types and highlight.js language brushes Fixes #2535
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
caption: codeblock
|
||||
created: 20151103160200000
|
||||
modified: 20151103160200000
|
||||
modified: 20160817175325205
|
||||
tags: Widgets
|
||||
title: CodeBlockWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -16,9 +16,14 @@ displayed monospace. A language may optionally be specified using the
|
||||
|
||||
The content of the `<$codeblock>` widget is ignored.
|
||||
|
||||
|!Attribute |!Description|
|
||||
|code|Contents of the block to render as code|
|
||||
|language|Programming language for syntax highlighting|
|
||||
|!Attribute |!Description |
|
||||
|code |Contents of the block to render as code |
|
||||
|language |Programming language for syntax highlighting |
|
||||
|
||||
The `language` attribute accepts either:
|
||||
|
||||
* a Highlight.js language code (see https://highlightjs.org/static/demo/ for a list)
|
||||
* a MIME type (eg, `text/html` or `image/svg+xml`)
|
||||
|
||||
! Examples
|
||||
|
||||
|
||||
Reference in New Issue
Block a user