Formatting of Julia code in Markdown files#197
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #197 +/- ##
==========================================
- Coverage 92.88% 92.85% -0.03%
==========================================
Files 8 8
Lines 4032 4073 +41
==========================================
+ Hits 3745 3782 +37
- Misses 287 291 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Extend Runic to format Julia code blocks inside Markdown (`.md`) files.
The file dispatch is by extension: `runic foo.md` (or
`Runic.format_file("foo.md")`) formats only the embedded Julia code
blocks (same rules as `--docstrings`), leaving the surrounding prose
untouched. Stdin can be routed through the Markdown formatter by
passing `--stdin-filename=*.md`.
Directory walks are controlled by a new `--extensions=<list>` flag
(default `jl`, e.g. `--extensions=jl,md` to walk both). Explicit file
paths always bypass this filter. `--lines` is supported with block-
granular semantics: any code block whose line range overlaps a
`--lines` range is formatted in full; blocks outside are left
untouched.
Closes #197.
Co-Authored-By: Claude Code <noreply@anthropic.com>
bf25b11 to
069fc0f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extend Runic to format Julia code blocks inside Markdown (
.md) files. The file dispatch is by extension:runic foo.md(orRunic.format_file("foo.md")) formats only the embedded Julia code blocks (same rules as--docstrings), leaving the surrounding prose untouched. Stdin can be routed through the Markdown formatter by passing--stdin-filename=*.md.Directory walks are controlled by a new
--extensions=<list>flag (defaultjl, e.g.--extensions=jl,mdto walk both). Explicit file paths always bypass this filter.--linesis supported with block- granular semantics: any code block whose line range overlaps a--linesrange is formatted in full; blocks outside are left untouched.Closes #197.