INNER CODE UNIT · Python
has_advisory_marker
uvwt/agentdock · core-skills/skill-authoring/run.py:154
def has_advisory_marker(value: str) -> bool:
lowered = value.lower()
return any(marker in lowered for marker in ADVISORY_MARKERS)
def markdown_match_is_advisory(content: str, start: int) -> bool:
lines = content.splitlines()
line_index = content.count("\n", 0, start)
current = lines[line_index].strip() if line_index < len(lines) else ""
if has_advisory_marker(current):
return True
if not LIST_ITEM_PATTERN.match(current):
return False
# 列表中的禁止项只继承同一列表前的说明句,不读取任意邻近段落。
for previous in reversed(lines[:line_index]):
stripped = previous.strip()
if not stripped: