-
Notifications
You must be signed in to change notification settings - Fork 469
Experimental command to format code blocks embedded in docstrings #7598
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
base: master
Are you sure you want to change the base?
Conversation
Looking in to why CI fails. |
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.
Looks promising!
Will play with this once CI is green.
lineCount := currentLine + 1; | ||
match (lines, !currentCodeBlockContents) with | ||
| l :: rest, None -> | ||
if String.trim l = "```rescript" then ( |
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.
Maybe check with a lowercase compare?
Allowing ReScript
as well.
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.
Lowercase language identifier is the standard for tagging md code blocks. But we should probably add support for ```res as well.
f7f994f
to
dc2cc93
Compare
…environments in CI
rescript
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/win32-x64
commit: |
@nojaf some tweaking left, but please do play around with it if you want! |
Adds an experimental command to
tools
for formatting ReScript code blocks in docstrings.I put it under
tools
just because that was the easiest place to put it. Feedback gladly accepted on where to put it.I ran formatting on
Stdlib_Result.resi
so you can see an example of the results easily.