Code

Inline code

Wrap inline snippets of code with `.

In this example, `<section></section>` should be wrapped as **code**.

Renders to:

In this example, <section></section> should be wrapped as code.

HTML:

<p>In this example, <code>&lt;section&gt;&lt;/section&gt;</code> should be wrapped as <strong>code</strong>.</p>

Code Blocks

Indented code

Or indent several lines of code by at least two spaces, as in:

    // Some comments
    line 1 of code
    line 2 of code
    line 3 of code

Renders to:

// Some comments
line 1 of code
line 2 of code
line 3 of code

HTML:

<pre>
  <code>
    // Some comments
    line 1 of code
    line 2 of code
    line 3 of code
  </code>
</pre>

Block code "fences"

Use "fences" ``` to block in multiple lines of code.

Sample text here...

HTML:

<pre>
  <code>Sample text here...</code>
</pre>

Syntax highlighting

GFM, or "GitHub Flavored Markdown" also supports syntax highlighting. To activate it, simply add the file extension of the language you want to use directly after the first code "fence", ```js, and syntax highlighting will automatically be applied in the rendered HTML.

For example, to apply syntax highlighting to JavaScript code:

    ```js
    grunt.initConfig({
      assemble: {
        options: {
          assets: 'docs/assets',
          data: 'src/data/*.{json,yml}',
          helpers: 'src/custom-helpers.js',
          partials: ['src/partials/**/*.{hbs,md}']
        },
        pages: {
          options: {
            layout: 'default.hbs'
          },
          files: {
            './': ['src/templates/pages/index.hbs']
          }
        }
      }
    };
    ```
# Literals
1234
0.0e101
.123
0b01010011100
0o01234567
0x0987654321abcdef
7
2147483647
3L
79228162514264337593543950336L
0x100000000L
79228162514264337593543950336
0xdeadbeef
3.14j
10.j
10j
.001j
1e100j
3.14e-10j


# String Literals
'For\''
"God\""
"""so loved
the world"""
'''that he gave
his only begotten\' '''
'that whosoever believeth \
in him'
''

# Identifiers
__a__
a.b
a.b.c

# Operators
+ - * / % & | ^ ~ < >
== != <= >= <> << >> // **
and or not in is

# Delimiters
() [] {} , : ` = ; @ .  # Note that @ and . require the proper context.
+= -= *= /= %= &= |= ^=
//= >>= <<= **=

# Keywords
as assert break class continue def del elif else except
finally for from global if import lambda pass raise
return try while with yield

# Python 2 Keywords (otherwise Identifiers)
exec print

# Python 3 Keywords (otherwise Identifiers)
nonlocal

# Types
bool classmethod complex dict enumerate float frozenset int list object
property reversed set slice staticmethod str super tuple type

# Python 2 Types (otherwise Identifiers)
basestring buffer file long unicode xrange

# Python 3 Types (otherwise Identifiers)
bytearray bytes filter map memoryview open range zip

# Some Example code
import os
from package import ParentClass

@nonsenseDecorator
def doesNothing():
    pass

class ExampleClass(ParentClass):
    @staticmethod
    def example(inputStr):
        a = list(inputStr)
        a.reverse()
        return ''.join(a)

    def __init__(self, mixin = 'Hello'):
        self.mixin = mixin

Renders to:

query-06.rq
PREFIX rism: <http://rism.online/>
PREFIX ct: <http://data.linkedct.org/resource/linkedct/>
PREFIX schema: <http://schema.org/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX nfdicore: <https://nfdi.fiz-karlsruhe.de/ontology/>
PREFIX cto: <https://nfdi4culture.de/ontology#>
PREFIX partitura: <https://nocodb.nfdi4culture.de/dashboard/#/nc/pxjfen9oerev7k9/mj3w842gefzot7u?rowId=>
PREFIX rism: <https://rism.online/sources/>

SELECT
  (?partituraLabel as ?opera)
  (?composerLabel as ?composer)
  (SAMPLE(?locationLabel) as ?location)
  (SAMPLE(?year) as ?year)
  (SAMPLE(?rismItem) as ?rism)
  (SAMPLE(?partitura) as ?partitura)
WHERE {
  SERVICE <https://lod.academy/dhi-rom/data/partitura/sparql> {
    SELECT
      ?partitura
      ?partituraLabel
      ?composerLabel
      ?rismItem
      ?locationLabel
      ?year
    {
      ?partitura a cto:Item .
      ?partitura rdfs:label ?partituraLabel .

      ?partitura schema:composer ?composer .
      ?composer rdfs:label ?composerLabel .

      ?partitura cto:relatedLocation ?location .
      ?location rdfs:label ?locationLabel .

      ?partitura cto:relatedEvent ?event .
      ?event nfdicore:startDate ?year .

      ?partitura cto:relatedItem ?rismItem .
    }
  }

  # with a relation to Pietro Metastasio
  ?rismItem cto:relatedPerson <https://rism.online/people/97823> .
}
GROUP BY ?partituraLabel ?composerLabel
ORDER BY ?partituraLabel ?composerLabel