Skip to content

Commit

Permalink
Fix regex by escaping .
Browse files Browse the repository at this point in the history
  • Loading branch information
wetmore committed Jul 1, 2020
1 parent c5ce3c4 commit 5bc782a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const highlightjs = (md, opts) => {
if (opts.inline) {
// Match kramdown- or pandoc-style language specifier.
// e.g. `code`{:.ruby} or `code`{.haskell}
const re = new RegExp('^{:?.([^}]+)}')
const re = new RegExp('^{:?\\.([^}]+)}')

md.renderer.rules.code_inline = (tokens, idx) => {
const code = tokens[idx]
Expand Down

0 comments on commit 5bc782a

Please sign in to comment.