You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by li...@apache.org on 2023/06/14 19:40:26 UTC

[arrow-adbc] branch main updated: docs: fix syntax highlighting in recipe (#798)

This is an automated email from the ASF dual-hosted git repository.

lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git


The following commit(s) were added to refs/heads/main by this push:
     new 0a86332d docs: fix syntax highlighting in recipe (#798)
0a86332d is described below

commit 0a86332d42a35eba0bd1bdd2508162307e9f8e36
Author: David Li <li...@gmail.com>
AuthorDate: Wed Jun 14 15:40:20 2023 -0400

    docs: fix syntax highlighting in recipe (#798)
---
 docs/source/cpp/recipe/quickstart.cc | 5 +++--
 docs/source/ext/adbc_cookbook.py     | 1 +
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/docs/source/cpp/recipe/quickstart.cc b/docs/source/cpp/recipe/quickstart.cc
index 459a6345..555707a5 100644
--- a/docs/source/cpp/recipe/quickstart.cc
+++ b/docs/source/cpp/recipe/quickstart.cc
@@ -43,8 +43,9 @@
 ///
 /// .. code-block:: shell
 ///
-///    cd docs/source/cpp/recipe
-///    cmake .
+///    mkdir build
+///    cd build
+///    cmake ../docs/source/cpp/recipe
 ///    cmake --build . --target quickstart
 ///    ./quickstart
 ///
diff --git a/docs/source/ext/adbc_cookbook.py b/docs/source/ext/adbc_cookbook.py
index 4322b910..626c4b9f 100644
--- a/docs/source/ext/adbc_cookbook.py
+++ b/docs/source/ext/adbc_cookbook.py
@@ -126,6 +126,7 @@ class RecipeDirective(SphinxDirective):
                 line_max = fragment.lines[-1].lineno
                 lines = [
                     f".. literalinclude:: {self.arguments[0]}",
+                    f"   :language: {language}",
                     "   :linenos:",
                     "   :lineno-match:",
                     f"   :lines: {line_min}-{line_max}",