Improve syntax highlighting in the language reference

Highlight all Slint code and don't do the preview on snippets where it
doesn't make sense.

Some snippets, such as the bare statement or expression snippets, are
now highlighted, but they are continued to be excluded from the doctest.
This commit is contained in:
Simon Hausmann 2022-03-23 11:27:08 +01:00 committed by Simon Hausmann
parent 1891e4489a
commit ed5b76e7fc
5 changed files with 46 additions and 28 deletions

View file

@ -59,7 +59,7 @@ Slint comes with a markup language that is specifically designed for user interf
powerful way to describe graphical elements, their placement, and the flow of data through the different states. It is a familiar syntax to describe the hierarchy
of elements and property bindings. Here's the obligatory "Hello World":
.. code-block:: slint-no-preview
.. code-block:: slint,ignore
HelloWorld := Window {
width: 400px;