CodeReformat

Reformat code so that is more human readable

Chat Example

Programmatic Access

Retrieve the prompt:
LLMPrompt["CodeReformat"]

LLMResourceFunction["CodeReformat"][code]

rewrite the following code to be more easily read

Examples

Prompt Source

Publisher Information

Author Notes

If you're using this prompt outside of the chat environment, you will need to convert the code manually into a string before being fed into the LLM. If the code contains no double quotes you can simply wrap the function in double quotes. If it does have double quotes, you will have to escape the quotes in the string using backslash (\").