This file is indexed.

/usr/share/doc/python-markdown-doc/docs/extensions/code_hilite.html is in python-markdown-doc 2.6.9-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<title>CodeHilite Extension &#8212; Python Markdown</title>
<link rel="stylesheet" href="../default.css" type="text/css">
</head>
<body>

<div class="related">
  <h3>Navigation</h3>
  <ul>
    <li class="right" style="margin-right: 10px">
      <a href="../siteindex.html" title="General Index">index</a></li>
    <li class="right">
      <a href="header_id.html" title="HeaderId Extension"
         accesskey="N">next</a> |</li>
    <li class="right">
      <a href="admonition.html" title="Admonition Extension"
         accesskey="P">previous</a> |</li>
    <li><img src="../py.png" alt=""
             style="vertical-align: middle; margin-top: -1px"/></li>
    <li><a href="../index.html">Python Markdown v2.6.9 documentation</a> &raquo;</li>
    <li><a href="index.html">Extensions</a> &raquo;</li>
<li><a href="code_hilite.html">CodeHilite Extension</a> &raquo;</li>
  </ul>
</div> <!-- .related -->

<div class="document">
  <div class="documentwrapper">
    <div class="bodywrapper">
      <div class="body">
<h1 id="codehilite">CodeHilite<a class="headerlink" href="#codehilite" title="Permanent link">&para;</a></h1>
<h2 id="summary">Summary<a class="headerlink" href="#summary" title="Permanent link">&para;</a></h2>
<p>The CodeHilite extension adds code/syntax highlighting to standard
Python-Markdown code blocks using <a href="http://pygments.org/">Pygments</a>.</p>
<p>This extension is included in the standard Markdown library.</p>
<h2 id="setup">Setup<a class="headerlink" href="#setup" title="Permanent link">&para;</a></h2>
<h3 id="step-1-download-and-install-pygments">Step 1: Download and Install Pygments<a class="headerlink" href="#step-1-download-and-install-pygments" title="Permanent link">&para;</a></h3>
<p>You will also need to <a href="http://pygments.org/download/">download</a> and install the Pygments package on your
<code>PYTHONPATH</code>. The CodeHilite extension will produce HTML output without
Pygments, but it won&rsquo;t highlight anything (same behavior as setting
<code>use_pygments</code> to <code>False</code>).</p>
<h3 id="step-2-add-css-classes">Step 2: Add CSS Classes<a class="headerlink" href="#step-2-add-css-classes" title="Permanent link">&para;</a></h3>
<p>You will need to define the appropriate CSS classes with appropriate rules.
The CSS rules either need to be defined in or linked from the header of your
HTML templates. Pygments can generate CSS rules for you. Just run the following
command from the command line:</p>
<pre><code>pygmentize -S default -f html -a .codehilite &gt; styles.css
</code></pre>
<p>If you are using a different <code>css_class</code> (default: <code>codehilite</code>), then
set the value of the <code>-a</code> option to that class name. The CSS rules will be
written to the <code>styles.css</code> file which you can copy to your site and link from
your HTML templates.</p>
<p>If you would like to use a different theme, swap out <code>default</code> for the desired
theme. For a list of themes installed on your system (additional themes can be
installed via Pygments plugins), run the following command:</p>
<pre><code>pygmentize -L style
</code></pre>
<p>!!! see also</p>
<pre><code>GitHub user [richeland] has provided a number of different [CSS style
sheets][rich] which work with Pygments along with a [preview] of each theme.
The `css_class` used is the same as the default value for that option
(`codehilite`). However, the Python-Markdown project makes no guarantee that
richeland's CSS styles will work with the version of Pygments you are using.
To ensure complete compatibility, you should generate the CSS rules from
your own installation of Pygments.
</code></pre>
<p>See Pygments&rsquo; excellent <a href="http://pygments.org/docs/">documentation</a> for more details. If no language is
defined, Pygments will attempt to guess the language. When that fails, the code
block will not be highlighted.</p>
<h2 id="syntax">Syntax<a class="headerlink" href="#syntax" title="Permanent link">&para;</a></h2>
<p>The CodeHilite extension follows the same <a href="http://daringfireball.net/projects/markdown/syntax#precode">syntax</a> as regular Markdown code
blocks, with one exception. The highlighter needs to know what language to use for
the code block. There are three ways to tell the highlighter what language the
code block contains and each one has a different result.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The format of the language identifier only effects the display of line numbers
if <code>linenums</code> is set to <code>None</code> (the default). If set to <code>True</code> or <code>False</code>
(see <a href="#usage">Usage</a> below) the format of the identifier has no effect on the
display of line numbers &ndash; it only serves as a means to define the language
of the code block.</p>
</div>
<h3 id="shebang-with-path">Shebang (with path)<a class="headerlink" href="#shebang-with-path" title="Permanent link">&para;</a></h3>
<p>If the first line of the code block contains a shebang, the language is derived
from that and line numbers are used.</p>
<pre><code>    #!/usr/bin/python
    # Code goes here ...
</code></pre>
<p>Will result in:</p>
<pre><code>#!/usr/bin/python
# Code goes here ...
</code></pre>
<h3 id="shebang-no-path">Shebang (no path)<a class="headerlink" href="#shebang-no-path" title="Permanent link">&para;</a></h3>
<p>If the first line contains a shebang, but the shebang line does not contain a
path (a single <code>/</code> or even a space), then that line is removed from the code
block before processing. Line numbers are used.</p>
<pre><code>    #!python
    # Code goes here ...
</code></pre>
<p>Will result in:</p>
<pre><code># Code goes here ...
</code></pre>
<h3 id="colons">Colons<a class="headerlink" href="#colons" title="Permanent link">&para;</a></h3>
<p>If the first line begins with three or more colons, the text following the
colons identifies the language. The first line is removed from the code block
before processing and line numbers are not used.</p>
<pre><code>    :::python
    # Code goes here ...
</code></pre>
<p>Will result in:</p>
<pre><code># Code goes here ...
</code></pre>
<p>Certain lines can be selected for emphasis with the colon syntax. When
using Pygments&rsquo; default CSS styles, emphasized lines have a yellow background.
This is useful to direct the reader&rsquo;s attention to specific lines.</p>
<pre><code>:::python hl_lines="1 3"
# This line is emphasized
# This line isn't
# This line is emphasized
</code></pre>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p><code>hl_lines</code> is named for Pygments&rsquo; option meaning &ldquo;highlighted lines&rdquo;.</p>
</div>
<h3 id="when-no-language-is-defined">When No Language is Defined<a class="headerlink" href="#when-no-language-is-defined" title="Permanent link">&para;</a></h3>
<p>CodeHilite is completely backwards compatible so that if a code block is
encountered that does not define a language, the block is simply wrapped in
<code>&lt;pre&gt;</code> tags and output.</p>
<pre><code>    # Code goes here ...
</code></pre>
<p>Will result in:</p>
<pre><code># Code goes here ...
</code></pre>
<p>Lets see the source for that:</p>
<pre><code>&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;code&gt;# Code goes here ...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
</code></pre>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>When no language is defined, the Pygments highlighting engine will try to guess
the language (unless <code>guess_lang</code> is set to <code>False</code>). Upon failure, the same
behavior will happen as described above.</p>
</div>
<h2 id="usage">Usage<a class="headerlink" href="#usage" title="Permanent link">&para;</a></h2>
<p>See <a href="index.html">Extensions</a> for general extension usage, specify
<code>markdown.extensions.codehilite</code> as the name of the extension.</p>
<p>See the <a href="../reference.html#extensions">Library Reference</a> for information about
configuring extensions.</p>
<p>The following options are provided to configure the output:</p>
<ul>
<li>
<p><strong><code>linenums</code></strong>:
    Use line numbers. Possible values are <code>True</code> for yes, <code>False</code> for no and
    <code>None</code> for auto. Defaults to <code>None</code>.</p>
<p>Using <code>True</code> will force every code block to have line numbers, even when
using colons (<code>:::</code>) for language identification.</p>
<p>Using <code>False</code> will turn off all line numbers, even when using shebangs
(<code>#!</code>) for language identification.</p>
</li>
<li>
<p><strong><code>guess_lang</code></strong>:
    Automatic language detection. Defaults to <code>True</code>.</p>
<p>Using <code>False</code> will prevent Pygments from guessing the language, and thus
highlighting blocks only when you explicitly set the language.</p>
</li>
<li>
<p><strong><code>css_class</code></strong>:
    Set CSS class name for the wrapper <code>&lt;div&gt;</code> tag. Defaults to
    <code>codehilite</code>.</p>
</li>
<li>
<p><strong><code>pygments_style</code></strong>:
    Pygments HTML Formatter Style (<code>ColorScheme</code>). Defaults to <code>default</code>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This is useful only when <code>noclasses</code> is set to <code>True</code>, otherwise the
CSS styles must be provided by the end user.</p>
</div>
</li>
<li>
<p><strong><code>noclasses</code></strong>:
    Use inline styles instead of CSS classes. Defaults to <code>False</code>.</p>
</li>
<li>
<p><strong><code>use_pygments</code></strong>:
    Defaults to <code>True</code>. Set to <code>False</code> to disable the use of Pygments.
    If a language is defined for a code block, it will be assigned to the
    <code>&lt;code&gt;</code> tag as a class in the manner suggested by the <a href="http://www.w3.org/TR/html5/text-level-semantics.html#the-code-element">HTML5 spec</a>
    (alternate output will not be entertained) and might be used by a JavaScript
    library in the browser to highlight the code block.</p>
</li>
</ul>
      </div> <!-- .body -->
    </div> <!-- .bodywrapper -->
  </div> <!-- .documentwrapper -->

  <div class="sphinxsidebar">
    <div class="sphinxsidebarwrapper">
    <h3>Table Of Contents</h3>
    <div class="toc">
<ul>
<li><a href="#codehilite">CodeHilite</a><ul>
<li><a href="#summary">Summary</a></li>
<li><a href="#setup">Setup</a><ul>
<li><a href="#step-1-download-and-install-pygments">Step 1: Download and Install Pygments</a></li>
<li><a href="#step-2-add-css-classes">Step 2: Add CSS Classes</a></li>
</ul>
</li>
<li><a href="#syntax">Syntax</a><ul>
<li><a href="#shebang-with-path">Shebang (with path)</a></li>
<li><a href="#shebang-no-path">Shebang (no path)</a></li>
<li><a href="#colons">Colons</a></li>
<li><a href="#when-no-language-is-defined">When No Language is Defined</a></li>
</ul>
</li>
<li><a href="#usage">Usage</a></li>
</ul>
</li>
</ul>
</div>


    <h4>Previous topic</h4>
      <p class="topless"><a href="admonition.html"
         title="previous chapter">Admonition Extension</a></p>
    <h4>Next topic</h4>
      <p class="topless"><a href="header_id.html"
         title="next chapter">HeaderId Extension</a></p>
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="https://github.com/Python-Markdown/markdown/issues"
             >Report a Bug</a></li>
      <li><a href="code_hilite.txt"
             rel="nofollow">Show Source</a></li>
    </ul>
    </div> <!-- .sphinxsidebarwrapper -->
  </div> <!-- .sphinxsidebar -->

  <div class="clearer"></div>
</div> <!-- .document -->

<div class="related">
  <h3>Navigation</h3>
  <ul>
    <li class="right" style="margin-right: 10px">
      <a href="../siteindex.html" title="General Index">index</a></li>
    <li class="right">
      <a href="header_id.html" title="HeaderId Extension"
         accesskey="N">next</a> |</li>
    <li class="right">
      <a href="admonition.html" title="Admonition Extension"
         accesskey="P">previous</a> |</li>
    <li><img src="../py.png" alt=""
             style="vertical-align: middle; margin-top: -1px"/></li>
    <li><a href="../index.html">Python Markdown v2.6.9 documentation</a> &raquo;</li>
    <li><a href="index.html">Extensions</a> &raquo;</li>
<li><a href="code_hilite.html">CodeHilite Extension</a> &raquo;</li>
  </ul>
</div> <!-- .related -->

<div class="footer">&copy; 2010-2012 Python Markdown Project</div>
</body>
</html>