-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,7 +126,7 @@ fn __stats_loc(language_type: &tokei::LanguageType, stats: &tokei::CodeStats) -> | |
{%- set line_types = attrs.line_types | default(value=['code']) -%} | ||
tokei::LanguageType::{{ language }} => stats.{{ line_types.0 }}{% for line_type in line_types | slice(start=1) %} + stats.{{ line_type }}{% endfor %}, | ||
{% endfor %} | ||
_ => unimplemented!("Language Type {:?}", language_type), | ||
_ => 0, // Tokei doesn't filter children languages according to the input config | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
spenserblack
Collaborator
|
||
} | ||
} | ||
|
||
|
This file contains 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
Actually, even if we don't support the language, since it's a nested language, would we still want to count the LOC?
In fact, revisiting this, instead of creating a branch for every language, perhaps it could just be simplified to
So that, instead of the generated code being this this:
The generated code is this:
For example, for a Vue file, we would probably want to count the internal Stylus lines, wouldn't we? In fact, right now, I think Markdown inside Jupyter and Markdown inside Markdown are the only nested languages that need an override.