-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add nirum syntax highlighting to docs target #324
Conversation
qria
commented
Aug 20, 2018
•
edited
Loading
edited
40aa611
to
2354749
Compare
Codecov Report
@@ Coverage Diff @@
## master #324 +/- ##
========================================
- Coverage 76.48% 76% -0.49%
========================================
Files 33 34 +1
Lines 2905 2926 +21
Branches 198 198
========================================
+ Hits 2222 2224 +2
- Misses 485 504 +19
Partials 198 198
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you adjust some coding styles?
CHANGES.md
Outdated
@@ -31,8 +31,8 @@ To be released. | |||
[[#297], [#304] by Jeong Ukjae] | |||
- Added `opengraphs` option for [OpenGraph] objects on docs. | |||
[[#283], [#305] by GyuYong Jung] | |||
- Added syntax highlighting. | |||
[[#310], [#311] by MinJune Kim] | |||
- Added syntax highlighting including nirum. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nirum → Nirum
src/Nirum/Targets/Docs.hs
Outdated
return { | ||
[keywords]: { | ||
keyword: 'record enum unboxed type union service' + | ||
' import throws as default', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vertical aligment should be adjusted.
src/Nirum/Targets/Docs.hs
Outdated
keyword: 'record enum unboxed type union service' + | ||
' import throws as default', | ||
built_in: 'bigint decimal int32 int64 float32 float64' + | ||
' text binary datetime date bool uuid uri', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verical aligment should be adjusted.
src/Nirum/Targets/Docs.hs
Outdated
compilePackage' :: Package Docs -> Map FilePath (Either Error BS.ByteString) | ||
compilePackage' pkg = unions | ||
[ fromList | ||
[ ("style.css", Right $ encodeUtf8 css) | ||
, ("nirum.js", Right $ encodeUtf8 javascript) | ||
, ("nirumHighlight.js" | ||
, Right $ encodeUtf8 $ TL.toStrict nirumHighlightJavascript) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The closing parenthesis should be aligned to the opening parenthesis and commas.
src/Nirum/Targets/Docs.hs
Outdated
compilePackage' :: Package Docs -> Map FilePath (Either Error BS.ByteString) | ||
compilePackage' pkg = unions | ||
[ fromList | ||
[ ("style.css", Right $ encodeUtf8 css) | ||
, ("nirum.js", Right $ encodeUtf8 javascript) | ||
, ("nirumHighlight.js" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a pair of parentheses contain multiple lines a whitespace should be placed right after the opening parenthesis.
@dahlia fixed as requested |
src/Nirum/Targets/Docs.hs
Outdated
' import throws as default', | ||
built_in: 'bigint decimal int32 int64 float32 float64' + | ||
' text binary datetime date bool uuid uri', | ||
literal: 'true false', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there are no literal called true
or false
in Nirum IDL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is gone now.