After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 657852 - Improve Mallard code snippets
Improve Mallard code snippets
Status: RESOLVED FIXED
Product: gedit-plugins
Classification: Other
Component: General
3.0.x
Other Linux
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2011-08-31 18:42 UTC by Jean-François Fortin Tam
Modified: 2019-03-23 20:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
mallard snippets (2.52 KB, text/xml)
2011-08-31 18:42 UTC, Jean-François Fortin Tam
  Details
Update mallard snippet, add wrapping shorcuts (5.55 KB, patch)
2011-09-02 07:09 UTC, Germán Poo-Caamaño
committed Details | Review

Description Jean-François Fortin Tam 2011-08-31 18:42:57 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?
Comment 1 Ignacio Casal Quinteiro (nacho) 2011-08-31 18:48:51 UTC
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.
Comment 2 Jean-François Fortin Tam 2011-08-31 21:36:19 UTC
Yes, I know, my patch is based on those (which I found quite unsatisfactory :)
Comment 3 Ignacio Casal Quinteiro (nacho) 2011-08-31 21:38:51 UTC
Have you spoken with the docs team? they were the ones that sent these ones. I'd like some review from them.
Comment 4 Shaun McCance 2011-09-02 00:41:50 UTC
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.)
Comment 5 Germán Poo-Caamaño 2011-09-02 01:19:55 UTC
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).
Comment 6 Germán Poo-Caamaño 2011-09-02 07:09:49 UTC
Created attachment 195456 [details] [review]
Update mallard snippet, add wrapping shorcuts
Comment 7 Ignacio Casal Quinteiro (nacho) 2011-09-02 09:29:59 UTC
Review of attachment 195456 [details] [review]:

Looks good to me. If you all reviewed that fine by me.
Comment 8 Germán Poo-Caamaño 2011-09-02 14:40:53 UTC
Review of attachment 195456 [details] [review]:

I just committed in master.
Comment 9 Germán Poo-Caamaño 2011-09-02 14:42:00 UTC
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.