[AppStream] Additional markup support in descriptions

Robert Ancell robert.ancell at canonical.com
Fri Jul 26 03:32:29 UTC 2019


Hi all,

I'd like to propose that more markup be supported in app descriptions to
allow publishers to express more.

The spec [1] currently supports the following:
- paragraphs <p>
- ordered and unordered lists <ol>, <ul> and <li>

I propose we add the following:
- emphasis <em>
- strong emphasis <strong>
- code <code> or <pre> or <pre><code> (CommonMark uses options 1 and 3, but
it's probably simpler to just only <code> or <pre> in AppStream. I'm not
enough of an XML expert to work out the differences between these tags).

I haven't picked these at random, as these are elements used in Markdown
from the CommonMark spec [2]. I'm familiar with this because Snaps use a
subset of CommonMark for their descriptions and I want to be able to
translate these descriptions into an AppStream compatible format so they
can be more easily shown in AppStream based apps like GNOME Software.

I do think these are generally useful tags to use for descriptions for any
system. Markdown is used quite a lot now (see GitHub/GitLab, .md files etc)
so the concepts of emphasis and code blocks are well understood and used
features.

For completeness the other major features of Markdown are:
- headers
- links
- images
I'm not proposing we add those at this time as the headers can be confusing
with the information shown around descriptions (it's a few paragraphs, not
a complete document) and links and images can be used maliciously. We do
support making links clickable in Snaps, but this is not something that
needs to be explicitly tagged in the description data.

Thanks!
--Robert

[1]
https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-description
[2] https://commonmark.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/appstream/attachments/20190726/477d133a/attachment.html>


More information about the AppStream mailing list