Fix for comments in type definitions

parent d9ec6cc4
......@@ -142,8 +142,8 @@ function highlightClean(func, callback, start) {
return highlightToHTML({
_prepend: [
[/(\/\/.*)/, ['comment']],
[/(\/\*)/, ['comment'], 'comment'],
[/(\s*)(\/\/.*)/, ['whitespace', 'comment']],
[/(\s*)(\/\*)/, ['whitespace', 'comment'], 'comment'],
],
_append: [
[/(\n[^\n\S]*)/, function(matches, states) {
......
-----
:: Position = // A record type
{ x :: Int
, y :: Int
}
:: Position = /* A record type
*/ { x :: Int
, y :: Int
}
-----
punctuation ::
whitespace
type Position
whitespace
punctuation =
whitespace
comment // A record type
whitespace \n
punctuation {
whitespace
field x
whitespace
punctuation ::
whitespace
type Int
whitespace \n
punctuation ,
whitespace
field y
whitespace
punctuation ::
whitespace
type Int
whitespace \n
punctuation }
whitespace \n
punctuation ::
whitespace
type Position
whitespace
punctuation =
whitespace
comment /* A record type\n*/
whitespace
punctuation {
whitespace
field x
whitespace
punctuation ::
whitespace
type Int
whitespace \n
punctuation ,
whitespace
field y
whitespace
punctuation ::
whitespace
type Int
whitespace \n
punctuation }
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