Skip to content

Commit

Permalink
Merge pull request #55 from glebec/f/markdown-support
Browse files Browse the repository at this point in the history
Support for Markdown code fence (haskell, hs)
  • Loading branch information
JustusAdam authored May 10, 2018
2 parents d61be4d + 148a2f2 commit a80df76
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@
"language": "literate haskell",
"scopeName": "text.tex.latex.haskell",
"path": "./syntaxes/literateHaskell.tmLanguage"
},
{
"scopeName": "markdown.haskell.codeblock",
"path": "./syntaxes/codeblock-haskell.json",
"injectTo": [
"text.html.markdown"
],
"embeddedLanguages": {
"meta.embedded.block.haskell": "haskell"
}
}
]
},
Expand Down
28 changes: 28 additions & 0 deletions syntaxes/codeblock-haskell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"fileTypes": [],
"injectionSelector": "L:markup.fenced_code.block.markdown",
"patterns": [
{
"include": "#haskell-code-block"
}
],
"repository": {
"haskell-code-block": {
"begin": "(haskell|hs)(\\s+[^`~]*)?$",
"end": "(^|\\G)(?=\\s*[`~]{3,}\\s*$)",
"patterns": [
{
"begin": "(^|\\G)(\\s*)(.*)",
"while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)",
"contentName": "meta.embedded.block.haskell",
"patterns": [
{
"include": "source.haskell"
}
]
}
]
}
},
"scopeName": "markdown.haskell.codeblock"
}

0 comments on commit a80df76

Please sign in to comment.