Closed ferki closed 4 years ago
Question: this depends on Perl::Tidy, do we want to add that to cpanfile? If yes, how it is the best to add? Perhaps some kind of author dependency?
I'd say something like this:
on develop => sub {
requires 'Perl::Tidy';
}
which means it gets installed using cpanm --with-develop
Thanks for the tip about cpanfile
! I think I'll merge this PR and then update the dependencies separately.
While working on the sytax highlighting topic, I noticed that the code blocks could use some updates. This PR aims to improve the situation by the following:
add a
misc/tidy_codeblocks
scriptThis basically extracts fenced perl code blocks from a document and passes them through perltidy in a way that preserves the original code block indent too. Then replaces the original code block with the tidied one.
Question: this depends on
Perl::Tidy
, do we want to add that tocpanfile
? If yes, how it is the best to add? Perhaps some kind of author dependency?fix some invalid code example
Mainly typos, but in a few cases, by converting them into full code examples instead of just fragments.
replace all leftover non-breaking space in markdown documents
Statocles and/or the Markdown renderer seems to be unhappy about them. I believe it's safe to just replace all of them with a normal space (note: this is the markdown source, non-breaking spaces are still fine in the generated HTML, and I beliebe
is also fine in the markdown when it's a must).tidy up all code examples by using the script mentioned above
This adds overall consistency for all code on the site. I'm happy to change
.perltidyrc
if needed, but I'm happy with the improvements already, so that can be handled in a different PR.