diff options
author | Sean Silva <silvas@purdue.edu> | 2012-12-13 20:14:25 +0000 |
---|---|---|
committer | Sean Silva <silvas@purdue.edu> | 2012-12-13 20:14:25 +0000 |
commit | c5351a0a63f8146a7aa3dc2b5cb6e7d40fe46244 (patch) | |
tree | 3a58fcace4b148a86174eb6af6e525406c50278b /docs/SphinxQuickstartTemplate.rst | |
parent | dcd3a70297eff3953757623e28fde62ba72b1706 (diff) | |
download | external_llvm-c5351a0a63f8146a7aa3dc2b5cb6e7d40fe46244.zip external_llvm-c5351a0a63f8146a7aa3dc2b5cb6e7d40fe46244.tar.gz external_llvm-c5351a0a63f8146a7aa3dc2b5cb6e7d40fe46244.tar.bz2 |
docs: Improve discussion of syntax highlighting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170145 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/SphinxQuickstartTemplate.rst')
-rw-r--r-- | docs/SphinxQuickstartTemplate.rst | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/docs/SphinxQuickstartTemplate.rst b/docs/SphinxQuickstartTemplate.rst index 1c03c97..b0002ba 100644 --- a/docs/SphinxQuickstartTemplate.rst +++ b/docs/SphinxQuickstartTemplate.rst @@ -107,17 +107,32 @@ You can make blocks of code like this: return 0 } -For a shell session, use a ``console`` code block: +For a shell session, use a ``console`` code block (some existing docs use +``bash``): .. code-block:: console $ echo "Goodbye cruel world!" $ rm -rf / -If you need to show LLVM IR use the ``llvm`` code block. Code blocks of ``c``, -``c++``, ``objc``, ``bash``, ``makefile`` kinds are supported. +If you need to show LLVM IR use the ``llvm`` code block. -You can show preformatted text without any syntax highlighting like this: +.. code-block:: llvm + + define i32 @test1() { + entry: + ret i32 0 + } + +Some other common code blocks you might need are ``c``, ``objc``, ``make``, +and ``cmake``. If you need something beyond that, you can look at the `full +list`_ of supported code blocks. + +.. _`full list`: http://pygments.org/docs/lexers/ + +However, don't waste time fiddling with syntax highlighting when you could +be adding meaningful content. When in doubt, show preformatted text +without any syntax highlighting like this: :: @@ -137,8 +152,6 @@ You can show preformatted text without any syntax highlighting like this: .++:.. ... -One can also use a ``none`` code block to turn off highlighting. - Hopefully you won't need to be this deep """""""""""""""""""""""""""""""""""""""" |