sourcecode short code
I just noticed an update in the sourcecode shortcode . It seems that the previous bug is gone, which was it showed ‘>’ symbol in ‘bash’ format as html ‘>’ .
The problem is now as previous this new update does not allow any padding on the top of the codes, as the older version. So one liner codes looks ugly also is not readable as previous. Check this page in my blog http://wp.me/pmGbq-3f . Is there any changes in the sourcecode shortcode so that we can adjust the padding? Or is there any way that i can add some paddings at the top and the bottom of the codes? There is one way that i think is to place manual blank lines. But it would be better to have separate padding. And if there is no way to add padding,
I would like to request the wordpress.com developers to modify the sourcecode shortcode so that it by default adds some amount of padding at the top and the bottom both (5px or some).
The blog I need help with is phoxis.wordpress.com.
My suggestion is to send this directly into staff since there is absolutely no guarantee that the will see it here in the forums. http://support.wordpress.com/contact/
thanks, i have mailed this content, lets see now.
You’re welcome. I agree with you that a smidgeon of padding at the top and bottom would make things look a whole lot better.
We’re still tweaking the new sourcecode shortcode (I agree that some padding may be good there) and writing up the new support document and a blog post, but this may help some. Try adding light=”true” to the shortcode, like so:
[sourcecode language="cpp" light="true"]your code here[/sourcecode]
That will remove the line numbers, toolbar, etc. and may help some with legibility.
The line numbers and the toolbars are perfectly allright. In the previous version the toolbar was a static one and it, itself created a good top padding. Still it is very good to know that there is a way to remove them, and would definitely help me to format some non-sourcecode or non-syntax strict stuffs with a good look.
For the padding matter i think it would be good if there is a default padding of a fixed amount of pixels (5px or so) and the shortcode has a ‘padding’ property as it has the ‘light’ property. So if the user doesnot needs padding he can set it true. Or the padding amount in pixels could also be set, but it might make things complicated, but this option can stay to override the default padding amount. These are just ideas, for me some amount of padding will do.
I will wait till wordpress.com comes out with the new tweaks and documentation.
The topic ‘sourcecode short code’ is closed to new replies.