From 77db6c0e06700c462ecb6114eaf960dc406f3e64 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Wed, 19 Mar 2014 16:13:38 -0700 Subject: [PATCH] Add YAML syntax highlighting in docs Also added JSON and tweaked properties settings. Fixes gh-511 --- .../src/main/docbook/xsl/xslthl-config.xml | 2 + .../src/main/docbook/xsl/xslthl/json-hl.xml | 37 +++++++++++++++ .../main/docbook/xsl/xslthl/properties-hl.xml | 2 +- .../src/main/docbook/xsl/xslthl/yaml-hl.xml | 47 +++++++++++++++++++ 4 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 spring-boot-docs/src/main/docbook/xsl/xslthl/json-hl.xml create mode 100644 spring-boot-docs/src/main/docbook/xsl/xslthl/yaml-hl.xml diff --git a/spring-boot-docs/src/main/docbook/xsl/xslthl-config.xml b/spring-boot-docs/src/main/docbook/xsl/xslthl-config.xml index d0fd16e684..e4d677fc50 100644 --- a/spring-boot-docs/src/main/docbook/xsl/xslthl-config.xml +++ b/spring-boot-docs/src/main/docbook/xsl/xslthl-config.xml @@ -17,5 +17,7 @@ + + diff --git a/spring-boot-docs/src/main/docbook/xsl/xslthl/json-hl.xml b/spring-boot-docs/src/main/docbook/xsl/xslthl/json-hl.xml new file mode 100644 index 0000000000..59b9c48116 --- /dev/null +++ b/spring-boot-docs/src/main/docbook/xsl/xslthl/json-hl.xml @@ -0,0 +1,37 @@ + + + # + + " + \ + + + ' + \ + + + @ + ( + ) + + + . + e + f + d + l + + + + true + false + + + { + } + , + [ + ] + + + diff --git a/spring-boot-docs/src/main/docbook/xsl/xslthl/properties-hl.xml b/spring-boot-docs/src/main/docbook/xsl/xslthl/properties-hl.xml index e53ac478e7..775f2f13e7 100644 --- a/spring-boot-docs/src/main/docbook/xsl/xslthl/properties-hl.xml +++ b/spring-boot-docs/src/main/docbook/xsl/xslthl/properties-hl.xml @@ -31,7 +31,7 @@ Michiel Hendriks # - ^(.+)(?==|:) + ^(.+?)(?==|:) MULTILINE diff --git a/spring-boot-docs/src/main/docbook/xsl/xslthl/yaml-hl.xml b/spring-boot-docs/src/main/docbook/xsl/xslthl/yaml-hl.xml new file mode 100644 index 0000000000..a28008ec83 --- /dev/null +++ b/spring-boot-docs/src/main/docbook/xsl/xslthl/yaml-hl.xml @@ -0,0 +1,47 @@ + + + # + + " + \ + + + ' + \ + + + @ + ( + ) + + + . + e + f + d + l + + + + true + false + + + { + } + , + [ + ] + + + + ^(---)$ + + MULTILINE + + + ^(.+?)(?==|:) + + MULTILINE + +