aboutsummaryrefslogtreecommitdiffstats
path: root/info/texise
blob: 48267e97cd1cc4087fc2101422a9820ca446cd28 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env python
# -*- mode: python, encoding: utf-8 -*-
# See LICENSE file for copyright and license details.

import sys

data = sys.stdin.read()[:-1]

n = 0
while '`' in data:
    i = data.find('`')
    replacement = '@code{' if n % 2 == 0 else '}'
    data = data[:i] + replacement + data[i + 1:]
    n += 1

print(data)