From 3a4b205b2001d5a44e51c0667d39a18b0aadf667 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Thu, 6 Apr 2017 18:07:19 +0200 Subject: [PATCH] Use Rouge syntax highlighting in PDF version of Reference Manual This commit uses a tip provided by @mojavelinux to set the syntax highlighter to Rouge for the PDF version of the User Guide. Once Asciidoctor 1.5.7 has been released we will likely switch to Rouge for the HTML version of the Reference Manual as well. Issue: SPR-14997 --- gradle/docs.gradle | 2 +- src/docs/asciidoc/appendix.adoc | 1 + src/docs/asciidoc/core.adoc | 1 + src/docs/asciidoc/data-access.adoc | 1 + src/docs/asciidoc/integration.adoc | 1 + src/docs/asciidoc/overview.adoc | 1 + src/docs/asciidoc/testing.adoc | 1 + src/docs/asciidoc/web.adoc | 1 + 8 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gradle/docs.gradle b/gradle/docs.gradle index 5acdd37af3..031abb34d4 100644 --- a/gradle/docs.gradle +++ b/gradle/docs.gradle @@ -30,7 +30,7 @@ asciidoctor { revnumber: project.version, sectanchors: '', sectnums: '', - 'source-highlighter': 'coderay', + 'source-highlighter': 'coderay@', // TODO switch to 'rouge' once supported by the html5 backend stylesdir: 'stylesheets/', stylesheet: 'spring.css', 'spring-version': project.version diff --git a/src/docs/asciidoc/appendix.adoc b/src/docs/asciidoc/appendix.adoc index 4d661e561d..cb02ef7a94 100644 --- a/src/docs/asciidoc/appendix.adoc +++ b/src/docs/asciidoc/appendix.adoc @@ -5,6 +5,7 @@ :wiki-spring-framework: https://github.com/spring-projects/spring-framework/wiki :toc: left :toclevels: 2 +ifdef::backend-pdf[:source-highlighter: rouge] [[spring-whats-new]] == What's New in the Spring Framework diff --git a/src/docs/asciidoc/core.adoc b/src/docs/asciidoc/core.adoc index 79d2640383..9f1e1a9138 100644 --- a/src/docs/asciidoc/core.adoc +++ b/src/docs/asciidoc/core.adoc @@ -4,6 +4,7 @@ :api-spring-framework: {doc-root}/spring-framework/docs/{spring-version}/javadoc-api/org/springframework :toc: left :toclevels: 2 +ifdef::backend-pdf[:source-highlighter: rouge] This part of the reference documentation covers all of those technologies that are absolutely integral to the Spring Framework. diff --git a/src/docs/asciidoc/data-access.adoc b/src/docs/asciidoc/data-access.adoc index 5fe41d0f33..5a37c77ea9 100644 --- a/src/docs/asciidoc/data-access.adoc +++ b/src/docs/asciidoc/data-access.adoc @@ -4,6 +4,7 @@ :api-spring-framework: {doc-root}/spring-framework/docs/{spring-version}/javadoc-api/org/springframework :toc: left :toclevels: 2 +ifdef::backend-pdf[:source-highlighter: rouge] This part of the reference documentation is concerned with data access and the interaction between the data access layer and the business or service layer. diff --git a/src/docs/asciidoc/integration.adoc b/src/docs/asciidoc/integration.adoc index 261e9db338..82bc7fae19 100644 --- a/src/docs/asciidoc/integration.adoc +++ b/src/docs/asciidoc/integration.adoc @@ -6,6 +6,7 @@ :doc-spring-gemfire: {doc-root}/spring-gemfire/docs/current/reference :toc: left :toclevels: 2 +ifdef::backend-pdf[:source-highlighter: rouge] This part of the reference documentation covers the Spring Framework's integration with a number of Java EE (and related) technologies. diff --git a/src/docs/asciidoc/overview.adoc b/src/docs/asciidoc/overview.adoc index 5a4118f8ad..86e1a925d8 100644 --- a/src/docs/asciidoc/overview.adoc +++ b/src/docs/asciidoc/overview.adoc @@ -4,6 +4,7 @@ :api-spring-framework: {doc-root}/spring-framework/docs/{spring-version}/javadoc-api/org/springframework :toc: left :toclevels: 2 +ifdef::backend-pdf[:source-highlighter: rouge] [[overview-getting-started-with-spring]] diff --git a/src/docs/asciidoc/testing.adoc b/src/docs/asciidoc/testing.adoc index 918d399102..e522ddc9ed 100644 --- a/src/docs/asciidoc/testing.adoc +++ b/src/docs/asciidoc/testing.adoc @@ -5,6 +5,7 @@ :doc-spring-boot: {doc-root}/spring-boot/docs/current/reference :toc: left :toclevels: 2 +ifdef::backend-pdf[:source-highlighter: rouge] The adoption of the test-driven-development (TDD) approach to software development is certainly advocated by the Spring team, and so coverage of Spring's diff --git a/src/docs/asciidoc/web.adoc b/src/docs/asciidoc/web.adoc index e39f686261..136610c6be 100644 --- a/src/docs/asciidoc/web.adoc +++ b/src/docs/asciidoc/web.adoc @@ -4,6 +4,7 @@ :api-spring-framework: {doc-root}/spring-framework/docs/{spring-version}/javadoc-api/org/springframework :toc: left :toclevels: 2 +ifdef::backend-pdf[:source-highlighter: rouge] This part of the reference documentation covers Spring Framework's support for the presentation tier (and specifically web-based presentation tiers) including support -- GitLab