mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
20 lines
516 B
Plaintext
20 lines
516 B
Plaintext
Source Hightlight Filter Test
|
|
=============================
|
|
|
|
Details of the filter can be found in
|
|
`./doc/source-highlight-filter.txt`.
|
|
|
|
[python]
|
|
source~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
''' A multi-line
|
|
comment.'''
|
|
def sub_word(mo):
|
|
''' Single line comment.'''
|
|
word = mo.group('word') # Inline comment
|
|
if word in keywords[language]:
|
|
return quote + word + quote
|
|
else:
|
|
return word
|
|
source~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|