Skip to content

Add support for language-specific formatting #28

@terror

Description

@terror

If a language tag is present, we currently won't end up going 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions