Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
defined:
"""
if (
"sectioning-levels" in definition
and isinstance(definition["sectioning-levels"], MetaInlines)
and len(definition["sectioning-levels"].content) == 1
):
match = re.match(
Numbered.header_regex, definition["sectioning-levels"].content[0].text
)
if match:
# Compute the first and last levels section
defined[category]["first-section-level"] = len(match.group("hidden")) // 2
defined[category]["last-section-level"] = len(match.group("header")) // 2
if "first-section-level" in definition:
if isinstance(definition["first-section-level"], MetaString):
value = definition["first-section-level"].text
elif (
isinstance(definition["first-section-level"], MetaInlines)
and len(definition["first-section-level"].content) == 1
):
value = definition["first-section-level"].content[0].text
else:
debug(
"[WARNING] pandoc-numbering: first-section-level is not correct for category "
+ category
)
return
# Get the level
try:
level = int(value) - 1
link=MetaString("http://www.google.fr"),
),
MetaString("comments"),
),
size=MetaString("36"),
position=MetaString("right"),
),
MetaMap(
classes=MetaList(MetaString("warning")),
icons=MetaString("comments"),
),
MetaMap(
classes=MetaList(MetaString("tip")), position=MetaString("left")
),
MetaMap(
classes=MetaList(MetaString("v5.0")),
icons=MetaList(
MetaMap(
name=MetaString("balance-scale"),
version=MetaString("5.x"),
variant=MetaString("solid"),
color=MetaString("orange"),
)
def metadata(cls):
return {
"pandoc-latex-tip": MetaList(
MetaMap(
classes=MetaList(MetaString("tip"), MetaString("listing")),
icons=MetaList(
MetaMap(
name=MetaString("file-text"),
color=MetaString("darksalmon"),
link=MetaString("http://www.google.fr"),
),
MetaString("comments"),
),
size=MetaString("36"),
position=MetaString("right"),
),
MetaMap(
classes=MetaList(MetaString("warning")),
icons=MetaString("comments"),
),
MetaMap(
classes=MetaList(MetaString("tip")), position=MetaString("left")
),
MetaMap(
classes=MetaList(MetaString("v5.0")),
def metadata(cls):
return {
"pandoc-latex-tip": MetaList(
MetaMap(
classes=MetaList(MetaString("tip"), MetaString("listing")),
icons=MetaList(
MetaMap(
name=MetaString("file-text"),
color=MetaString("darksalmon"),
link=MetaString("http://www.google.fr"),
),
MetaString("comments"),
),
size=MetaString("36"),
position=MetaString("right"),
),
MetaMap(
classes=MetaList(MetaString("warning")),
icons=MetaString("comments"),
),
MetaMap(
classes=MetaList(MetaString("tip")), position=MetaString("left")
),
MetaMap(
classes=MetaList(MetaString("v5.0")),
icons=MetaList(
MetaMap(
name=MetaString("balance-scale"),
version=MetaString("5.x"),
variant=MetaString("solid"),
color=MetaString("orange"),
def metadata(cls):
return {
"pandoc-latex-tip": MetaList(
MetaMap(
classes=MetaList(MetaString("tip"), MetaString("listing")),
icons=MetaList(
MetaMap(
name=MetaString("file-text"),
color=MetaString("darksalmon"),
link=MetaString("http://www.google.fr"),
),
MetaString("comments"),
),
size=MetaString("36"),
position=MetaString("right"),
),
MetaMap(
classes=MetaList(MetaString("warning")),
icons=MetaString("comments"),
),
MetaMap(
classes=MetaList(MetaString("tip")), position=MetaString("left")
),
MetaMap(
classes=MetaList(MetaString("v5.0")),
icons=MetaList(
MetaMap(
classes=MetaList(MetaString("tip"), MetaString("listing")),
icons=MetaList(
MetaMap(
name=MetaString("file-text"),
color=MetaString("darksalmon"),
link=MetaString("http://www.google.fr"),
),
MetaString("comments"),
),
size=MetaString("36"),
position=MetaString("right"),
),
MetaMap(
classes=MetaList(MetaString("warning")),
icons=MetaString("comments"),
),
MetaMap(
classes=MetaList(MetaString("tip")), position=MetaString("left")
),
MetaMap(
classes=MetaList(MetaString("v5.0")),
icons=MetaList(
MetaMap(
name=MetaString("balance-scale"),
version=MetaString("5.x"),
variant=MetaString("solid"),
color=MetaString("orange"),
)
def metadata(cls):
return {
"pandoc-latex-tip": MetaList(
MetaMap(
classes=MetaList(MetaString("tip"), MetaString("listing")),
icons=MetaList(
MetaMap(
name=MetaString("file-text"),
color=MetaString("darksalmon"),
link=MetaString("http://www.google.fr"),
),
MetaString("comments"),
),
size=MetaString("36"),
position=MetaString("right"),
),
MetaMap(
classes=MetaList(MetaString("warning")),
icons=MetaString("comments"),
),
MetaMap(
classes=MetaList(MetaString("tip")), position=MetaString("left")
),
MetaMap(
classes=MetaList(MetaString("v5.0")),
icons=MetaList(
MetaMap(
name=MetaString("balance-scale"),