Indenting lost from comments in the Moodle Tracker

Indenting lost from comments in the Moodle Tracker

por Tim Hunt -
Número de respostas: 5
Imagem de Core developers Imagem de Documentation writers Imagem de Particularly helpful Moodlers Imagem de Peer reviewers Imagem de Plugin developers
So I don't forget, the bug I was trying to file was:


Summary: Code gets mangled when pasted into a bug report

Description: For example: MDL-6752. All the new code that I am being asked to consider has lost its indent, which is a pain in the neck. Is there any way round this?

(It's not that difficult to copy and paste the code into an editor, and reindent it, but it would be nice if I did not have to.)
Média das avaliações:  -
Em resposta à Tim Hunt

Re: Catch-22 at tracker

por Thomas Robb -
People who submit code should be asked to upload it as a text file if it involves indentation (as it should).  This is what I did for my yet unresolved submission MDL-6249.
Em resposta à Thomas Robb

Re: Catch-22 at tracker

por Martín Langhoff -
And yet, it's invaluable to be able to post code, and post back comments on the code. Code as attachments means it's harder to review the actual code.

+1 for making it usable to post diffs straight there, without attachments.
Em resposta à Martín Langhoff

Indenting lost from comments in the Moodle Tracker

por Martin Dougiamas -
Imagem de Core developers Imagem de Documentation writers Imagem de Moodle HQ Imagem de Particularly helpful Moodlers Imagem de Plugin developers Imagem de Testers
It sort of works ... it seems to only collapse non-leading whitespace

See MDL-6732 (feel free to test in there)
Em resposta à Martin Dougiamas

Re: Indenting lost from comments in the Moodle Tracker

por Martín Langhoff -
I can see it. It messes up diffs! triste

Looking at the html source, it's replacing spaces with   but only leading/trailing spaces, not within the line -- maybe it could respect PRE tags in the comments to support pasting code?

{comment also in bug}