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 md interpolator to create Markdown based docs #2452

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

987Nabil
Copy link
Contributor

Also distinguish between inline code and code block docs

The interpolator is currently not parsing, but is just dump and saves the input as "raw".
Trying to print it as plain text or html would currently fail.
Writing a markdown to Doc parser seemed to be too complex for now.
Maybe we could use RichTextCodec to impl. this later for all 3 formats (plain, commonmark, html)?

I worked together with someone from the intellij scala plugin at the ScalaDays.
He added default support for syntax highlighting of string interpolators named md.
So with the next release of the Scala plugin, md strings will have highlighting. But it can be activated manually already in the scala plugin settings.

Screenshot 2023-09-20 at 06 06 58
Screenshot 2023-09-20 at 06 07 37

fixes #2202
/claim #2202

@codecov-commenter
Copy link

codecov-commenter commented Sep 20, 2023

Codecov Report

Patch coverage: 39.39% and project coverage change: -0.09% ⚠️

Comparison is base (8780eb9) 64.21% compared to head (0e3b1c2) 64.13%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2452      +/-   ##
==========================================
- Coverage   64.21%   64.13%   -0.09%     
==========================================
  Files         136      137       +1     
  Lines        7118     7135      +17     
  Branches     1302     1228      -74     
==========================================
+ Hits         4571     4576       +5     
- Misses       2547     2559      +12     
Files Changed Coverage Δ
zio-http/src/main/scala/zio/http/package.scala 66.66% <ø> (ø)
zio-http/src/main/scala/zio/http/codec/Doc.scala 75.74% <37.50%> (-3.71%) ⬇️
...ttp/src/main/scala-2/zio/http/MdInterpolator.scala 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@987Nabil 987Nabil force-pushed the doc-string-interpolator branch from 7cf2ccb to aa008bf Compare September 20, 2023 05:08
Also distinguish between inline code and code block docs
@987Nabil 987Nabil force-pushed the doc-string-interpolator branch from aa008bf to 0e3b1c2 Compare September 20, 2023 05:38
@jdegoes jdegoes merged commit f20cab3 into zio:main Oct 10, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

doc string interpolation for Endpoint documentation
3 participants