Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Jun 28, 2022
1 parent d34fafb commit 3ba58aa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/docs/plugins/syntaxhighlight.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ module.exports = function(eleventyConfig) {

// Added in 3.1.1, add HTML attributes to the <pre> or <code> tags
preAttributes: {
tabindex: 0
tabindex: 0,

// Added in 4.1.0 you can use callback functions too
"data-language": function({ language, content, options }) {
return language;
}
},
codeAttributes: {},
});
Expand Down

0 comments on commit 3ba58aa

Please sign in to comment.