Add support for language-specific formatting
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 112
- Forks
- 2
- Avg merge
- 2h 52m
- Merged PRs (30d)
- 13
Description
If a language tag is present, we currently won't end up doing anything, i.e this test will fail:
#[test]
fn language_specific_formatting() -> Result {
Test::new()?
.markdown(
r#"
```rust present echo "fn main() { println!(\"Hello, World!\"); }"
```
"#,
)
.expected_status(0)
.expected_stdout(
r#"
```rust present echo "fn main() { println!(\"Hello, World!\"); }"
fn main() { println!("Hello, World!"); }
```
"#,
)
.run()
}
We can make it pass by looking for a subset of keywords as language tags, and then doing the entire parse -> command interpolation flow.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the language_specific_formatting test shown in the issue and run it to confirm the current failure. Trace the markdown parsing and command interpolation flow, then make recognized language tags follow the full parse-to-interpolation path; done means the test passes with the expected formatted output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100