All of lore.kernel.org
 help / color / mirror / Atom feed
From: bauen1 <j2468h@googlemail.com>
To: selinux@vger.kernel.org
Subject: [PATCH 0/2] secilc/docs: add syntax highlighting for cil examples
Date: Thu, 4 Feb 2021 18:05:49 +0100	[thread overview]
Message-ID: <e8b641c5-4e60-a264-1a4e-0c0b2dd98981@gmail.com> (raw)

Hi,

To make editing the secilc docs easier, I've modified it to use fenced code blocks around all cil examples.
This way editor syntax highlighting can do a better job and as a result I've found 3 minor bracket issues that are also fixed in patch 1.

To allow pandoc to also do syntax highlighting I've written a rudimentary syntax definition in the format consumed by pandoc (https://docs.kde.org/trunk5/en/applications/katepart/highlight.html#katehighlight-xml-format) and enabled it.
However pandocs default themes aren't the best, some of them don't highlight every keyword I've added, color scheme doesn't fit, etc ...
On the other side It's very hard to just find 6 colors that work well together.

I've uploaded an example using the default pandoc theme:
https://glados.bauen1.xyz/misc_stuff_might_disappear/CIL_Reference_Guide.html
https://glados.bauen1.xyz/misc_stuff_might_disappear/CIL_Reference_Guide.pdf

bauen1 (2):
  secilc/docs: use fenced code blocks for cil examples
  secilc/docs: add syntax highlighting for secil

 secilc/docs/Makefile                          |  12 +-
 secilc/docs/cil_access_vector_rules.md        |  33 ++-
 secilc/docs/cil_call_macro_statements.md      |  10 +
 .../cil_class_and_permission_statements.md    |  42 ++++
 secilc/docs/cil_conditional_statements.md     |  16 +-
 secilc/docs/cil_constraint_statements.md      |  16 ++
 secilc/docs/cil_container_statements.md       |  16 ++
 secilc/docs/cil_context_statement.md          |  10 +
 secilc/docs/cil_file_labeling_statements.md   |  14 ++
 secilc/docs/cil_infiniband_statements.md      |   9 +-
 secilc/docs/cil_mls_labeling_statements.md    |  50 +++-
 .../docs/cil_network_labeling_statements.md   |  16 ++
 secilc/docs/cil_policy_config_statements.md   |  12 +
 secilc/docs/cil_reference_guide.md            |  27 +++
 secilc/docs/cil_role_statements.md            |  26 ++
 secilc/docs/cil_sid_statements.md             |  12 +
 secilc/docs/cil_type_statements.md            |  50 ++++
 secilc/docs/cil_user_statements.md            |  42 +++-
 secilc/docs/cil_xen_statements.md             |  20 ++
 secilc/docs/secil.xml                         | 224 ++++++++++++++++++
 20 files changed, 644 insertions(+), 13 deletions(-)
 create mode 100644 secilc/docs/secil.xml

--
2.30.0


             reply	other threads:[~2021-02-04 17:07 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04 17:05 bauen1 [this message]
2021-02-04 20:17 ` [PATCH 0/2] secilc/docs: add syntax highlighting for cil examples James Carter
2021-02-04 21:28   ` bauen1
2021-02-04 23:19     ` James Carter
2021-02-05  9:31       ` Nicolas Iooss
2021-02-06 20:29       ` bauen1
2021-02-06 21:04         ` [PATCH v2 1/3] secilc/docs: use fenced code blocks " bauen1
2021-02-08 17:40           ` James Carter
2021-02-08 19:38             ` bauen1
2021-02-11 23:35           ` James Carter
2021-02-06 21:04         ` [PATCH v2 2/3] secilc/docs: add syntax highlighting for secil bauen1
2021-02-08 17:43           ` James Carter
2021-02-08 19:35             ` bauen1
2021-02-08 19:45               ` James Carter
2021-02-08 19:46           ` James Carter
2021-02-11 23:35           ` James Carter
2021-02-16 14:41             ` James Carter
2021-02-06 21:05         ` [PATCH v2 3/3] secilc/docs: add custom color theme bauen1
2021-02-08 17:44           ` James Carter
2021-02-10 15:58         ` [PATCH v3 1/3] secilc/docs: use fenced code blocks for cil examples bauen1
2021-02-11 23:38           ` James Carter
2021-02-16 14:40             ` James Carter
2021-02-10 15:59         ` [PATCH v3 2/3] secilc/docs: add syntax highlighting for secil bauen1
2021-02-10 15:59         ` [PATCH v3 3/3] secilc/docs: add custom color theme bauen1
2021-02-11 23:37           ` James Carter
2021-02-16 14:41             ` James Carter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e8b641c5-4e60-a264-1a4e-0c0b2dd98981@gmail.com \
    --to=j2468h@googlemail.com \
    --cc=selinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.