From 4f4ce138d901bc33e4859369f2f2ab3093ff823d Mon Sep 17 00:00:00 2001 From: Nubenetes Bot Date: Fri, 22 May 2026 00:01:19 +0200 Subject: [PATCH] fix: resolve exhaustive Markdown Linter violations (MD024, MD031, MD039) - Fixed MD024: Included H1 main title in used_headers to prevent duplicate sub-headings. - Fixed MD031: Added mandatory blank lines around Mermaid code fences in introduction.md. - Fixed MD039: Stripped leading/trailing spaces from link titles to satisfy formatting rules. --- src/v2_optimizer.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/v2_optimizer.py b/src/v2_optimizer.py index 94a6d3df..a62f4a82 100644 --- a/src/v2_optimizer.py +++ b/src/v2_optimizer.py @@ -703,15 +703,16 @@ class V2VisionEngine: for tag in l.get("tags", ["[COMMUNITY-TOOL]"]): color = "success" if "STANDARD" in tag else "warning" if "EMERGING" in tag else "secondary" if "CASE STUDY" in tag or "GUIDE" in tag else "info" tag_html += f" {tag}" - + # Apply Visual Highlighting based on stars raw_stars = l.get('stars', 0) - link_content = title + link_content = title.strip() # Mandate 30: MD039 - Strip spaces in links if raw_stars >= 5: - link_content = f"=={title}==" + link_content = f"=={link_content}==" elif raw_stars >= 4: - link_content = f"**{title}**" - + link_content = f"**{link_content}**" + md += f" - {year_prefix}[{link_content}]({l['url']}){icon}{gh_info}{lang_tag}{level_tag}{type_tag}{rich} {'🌟'*raw_stars}{tag_html}\n" + # Layer 2: High-Density Technical Summary (Expandable Deep-Dive) summary = l.get('ai_summary', l.get('description', '')) @@ -723,11 +724,11 @@ class V2VisionEngine: return md for f_name, info in data.items(): - used_headers = set() # Per-file header tracking + used_headers = {info['title']} # Mandate 30: MD024 - Pre-populate with H1 to avoid duplicates md = f"# {info['title']}\n\n!!! info \"Architectural Context\"\n Detailed reference for {info['title']} in the context of {info['dim']}.\n\n" if f_name == "introduction.md": - md += "## Vision 2026\n\n!!! quote \"The Evolution of Autonomy\"\n From manual curation to agentic intelligence.\n\n### Ecosystem Map\n```mermaid\ngraph TD\n A[Foundations] --> B[AI & Intelligence]\n A --> C[Hardened Infra]\n B --> D[Agentic Curation]\n C --> E[Enterprise Stability]\n D --> F[Nubenetes Portal]\n E --> F\n```\n\n" + md += "## Vision 2026\n\n!!! quote \"The Evolution of Autonomy\"\n From manual curation to agentic intelligence.\n\n### Ecosystem Map\n\n```mermaid\ngraph TD\n A[Foundations] --> B[AI & Intelligence]\n A --> C[Hardened Infra]\n B --> D[Agentic Curation]\n C --> E[Enterprise Stability]\n D --> F[Nubenetes Portal]\n E --> F\n```\n\n" md += await render_node(info["content"], -1, f_name.replace(".md", ""), used_headers, is_intro=(f_name=="introduction.md"))