doc: indentation in sample program

This commit is contained in:
Jean-Francois Dockes
2019-11-08 15:52:09 +01:00
parent 1302b185d8
commit a544a3e26d
2 changed files with 29 additions and 28 deletions
+14 -14
View File
@@ -2204,22 +2204,22 @@ metadatacmds = ; <em class=
import re
class MetaFixer(object):
def __init__(self):
pass
def __init__(self):
pass
def metafix(self, nm, txt):
if nm == 'bibtex:pages':
txt = re.sub(r'--', '-', txt)
elif nm == 'someothername':
# do something else
pass
elif nm == 'stillanother':
# etc.
pass
def metafix(self, nm, txt):
if nm == 'bibtex:pages':
txt = re.sub(r'--', '-', txt)
elif nm == 'someothername':
# do something else
pass
elif nm == 'stillanother':
# etc.
pass
return txt
def wrapup(self, metaheaders):
pass
return txt
def wrapup(self, metaheaders):
pass
</pre>
<p>If the 'metafix()' method is defined, it is called for
each metadata field. A new MetaFixer object is created