Verified Commit f49212c8 authored by Camil Staps's avatar Camil Staps 🙂

Also correctly highlight module headings

parent b7472608
......@@ -155,8 +155,9 @@ function highlightClean(func, callback, start) {
['keyword', 'whitespace'], 'generic'],
[/(import)(\s)/, ['keyword', 'whitespace'], 'import'],
[/(from)(\s)/, ['keyword', 'whitespace'], 'importFrom'],
[/(where|(?:(?:definition|implementation|system) )?module)(\s)/,
['keyword', 'whitespace']],
[/(where\b)/, ['keyword']],
[/((?:(?:definition|implementation|system)\s+)?module\b)/,
['keyword'], 'moduleName'],
[/(instance)(\s)/, ['keyword', 'whitespace'], 'instance'],
[/(derive)(\s)/, ['keyword', 'whitespace'], 'derive'],
[/(class)(\s)/, ['keyword', 'whitespace'], 'className'],
......@@ -178,6 +179,9 @@ function highlightClean(func, callback, start) {
[/(")/, ['literal literal-string'], 'string'],
[/([^\(\)\s]+)/, ['funcname'], 'funcargs']
],
moduleName: [
[/(\S+)/, ['modulename'], 'pop']
],
funcargs: [
[/((?::=)?=)/, ['punctuation'], 'jump:rhs'],
[/([:\[\](),]+)/, ['punctuation']],
......
......@@ -252,7 +252,7 @@ find :: (a -> Bool) (t a) -> Maybe a | Foldable t
-----
keyword definition module
whitespace
funcname Data.Foldable
modulename Data.Foldable
whitespace \n\n
keyword import
whitespace
......
......@@ -3,6 +3,6 @@ definition module StdList // Exported definitions of list functions
-----
keyword definition module
whitespace
funcname StdList
modulename StdList
whitespace
comment // Exported definitions of list functions
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment