Close
Edit

Markdown

Settings of Markdown

postfix

источник:
CodeHilite
Pygments comes with the following builtin styles

ключи: #postfix #email
Ключи: #bash, #html

Содержание >>

только важные выдержки


install

pip install markdown
pip install pygments

Импорт файла стилей

pygmentize -S default -f html -a .codehilite > styles.css

Примеры

тут bash

for i in `seq 1 10`;
        do
                echo $i
        done   

$dd = 'a';
$b = open('abc.rr','r+');

grep -r '^reg' --z=22


#!sh
#!/usr/bin/bash
# colorful
# highlight with pygments
pygmentize -S default -f html -a .codehilite > styles.css
pygmentize -S github-dark -f html -a .codehilite > styles-github-dark.css
pygmentize -L style # list avilable styles

pygmentize -S fruity -f html -a .language-bash > styles-bash.css

sudo install python

тут sql

select * from some where z=1

тут css

#content{
    background-color:azure;
    width: 700px;
    margin: auto;
    padding: 10px;
    min-height: 100vh;
}

тут js

function some_func(...args){
    let a=1;
    let b='b';
    return a;
}

тут html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

</body>
</html>

тут python

#!python
from typing import Iterator

# This is an example
class Math:
    @staticmethod
    def fib(n: int) -> Iterator[int]:
        """Fibonacci series up to n."""
        a, b = 0, 1
        while a < n:
            yield a
            a, b = b, a + b

result = sum(Math.fib(42))
print(f"The answer is {result}")

pygments styles
pygments styles

Ctrl + S : Update