Answer the question
In order to leave comments, you need to log in
How does it render its own markup?
Hello everyone, I am blogging. There was a problem how to display your own markup. For example:
[img] Image[/img] turns into an html tag
Answer the question
In order to leave comments, you need to log in
Write your own markup transformation rules as an option:
a = '''[img] Изображение[/img]'''
re.sub(r'\[img\]\s+(.*)\[/img\]', r'<img src="\1"></img>', a)
<img src="Изображение"></img>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question