GNOME Bugzilla – Bug 657852
Improve Mallard code snippets
Last modified: 2019-03-23 20:49:14 UTC
Created attachment 195337 [details] mallard snippets Attached are my code snippets to make it painless to edit mallard files, based on the HTML snippets. I think it is a definite improvement, would you like to include those by default?
There are some mallard snippets already http://git.gnome.org/browse/gedit/tree/plugins/snippets/data/mallard.xml check if you have more and feel free to provide a patch.
Yes, I know, my patch is based on those (which I found quite unsatisfactory :)
Have you spoken with the docs team? they were the ones that sent these ones. I'd like some review from them.
I've asked on gnome-doc-list for people to comment on this. One comment from me: in Mallard 1.0 at least, the section element does require an id attribute. So the section snippet here is encouraging non-valid Mallard. (This might change in 1.1. It's a *very* common mistake.)
It looks like a subset of a patch I wrote several months ago, but it did not get merged: https://gitorious.org/~gpoo/mallard-gedit-snippets/mallard-gedit-snippets-gpoo/blobs/master/mallard.xml That one has the id, also more tags available. There is a couple of nice things in Jeff's file, such as putting the selected text in a markup. For one of them, it does not work in my old gedit because the shortcut (Ctrl+i is already taken by "Goto to Line"). I also noticed the changes look bigger because there are spaces/tabs introduced. I am going to merge them with my patch and upload it here (later, I am in a rush now).
Created attachment 195456 [details] [review] Update mallard snippet, add wrapping shorcuts
Review of attachment 195456 [details] [review]: Looks good to me. If you all reviewed that fine by me.
Review of attachment 195456 [details] [review]: I just committed in master.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.