Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
empty list deletes the object.)
"""
doc = pf.json.loads(pf.sys.stdin.read())
if len(pf.sys.argv) > 1:
format = pf.sys.argv[1]
else:
format = ""
if type(actions) is type(toJSONFilter):
altered = pf.walk(doc, actions, format, doc[0]['unMeta'])
elif type(actions) is list:
altered = doc
for action in actions:
altered = pf.walk(altered, action, format, doc[0]['unMeta'])
pf.json.dump(altered, pf.sys.stdout)
if len(pf.sys.argv) > 1:
format = pf.sys.argv[1]
else:
format = ""
metadata = doc[0]['unMeta']
args = {k: v['c'] for k, v in metadata.items()}
autoref = args.get('autoref', True)
refmanager = ReferenceManager(autoref=autoref)
altered = doc
for action in refmanager.reference_filter:
altered = pf.walk(altered, action, format, metadata)
pf.json.dump(altered, pf.sys.stdout)
# required (when `` has been used).
if (format == 'latex' or format == 'beamer') and USED_BOX:
MetaList = elt('MetaList', 1)
MetaInlines = elt('MetaInlines', 1)
rawinlines = [MetaInlines([RawInline('tex',
'\\RequirePackage{mdframed}')])]
if 'header-includes' in metadata:
headerIncludes = metadata['header-includes']
if headerIncludes['t'] == 'MetaList':
rawinlines += headerIncludes['c']
else: # headerIncludes['t'] == 'MetaInlines'
rawinlines += [headerIncludes]
metadata['header-includes'] = MetaList(rawinlines)
newDocument['meta'] = metadata
json.dump(newDocument, sys.stdout)
empty list deletes the object.)
"""
doc = pf.json.loads(pf.sys.stdin.read())
if len(pf.sys.argv) > 1:
format = pf.sys.argv[1]
else:
format = ""
if type(actions) is type(toJSONFilter):
altered = pf.walk(doc, actions, format, doc[0]['unMeta'])
elif type(actions) is list:
altered = doc
for action in actions:
altered = pf.walk(altered, action, format, doc[0]['unMeta'])
pf.json.dump(altered, pf.sys.stdout)