Skip to content
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

Merged
merged 2 commits into from
Aug 21, 2018

Conversation

qria
Copy link
Contributor

@qria qria commented Aug 20, 2018

image

@qria qria force-pushed the highlight-nirum branch 2 times, most recently from 40aa611 to 2354749 Compare August 20, 2018 10:52
@codecov
Copy link

codecov bot commented Aug 20, 2018

Codecov Report

Merging #324 into master will decrease coverage by 0.48%.
The diff coverage is 25%.

Impacted file tree graph

@@           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
Impacted Files Coverage Δ
src/Nirum/Targets/Docs.hs 46.7% <25%> (-0.45%) ⬇️
...4-linux/Cabal-2.2.0.1/build/autogen/Paths_nirum.hs 5.88% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f2edb0f...eef6082. Read the comment docs.

@qria qria changed the title highlight-nirum Add nirum syntax highlighting to docs target Aug 20, 2018
Copy link
Member

@dahlia dahlia left a 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nirum → Nirum

return {
[keywords]: {
keyword: 'record enum unboxed type union service' +
' import throws as default',
Copy link
Member

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.

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',
Copy link
Member

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.

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)
Copy link
Member

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.

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"
Copy link
Member

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.

@qria qria force-pushed the highlight-nirum branch from 2354749 to c7b07a3 Compare August 21, 2018 02:43
@qria
Copy link
Contributor Author

qria commented Aug 21, 2018

@dahlia fixed as requested

' import throws as default',
built_in: 'bigint decimal int32 int64 float32 float64' +
' text binary datetime date bool uuid uri',
literal: 'true false',
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is gone now.

@dahlia dahlia merged commit 51ae9a5 into nirum-lang:master Aug 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants