writing-markdown

Detect misaligned ASCII art box borders in Markdown code blocks with CJK characters.

Updated Aug 17, 2024
One-click install
npx skills add https://github.com/LinoWhy/.dotfiles --skill writing-markdown-linowhy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-markdown
Source: https://github.com/LinoWhy/.dotfiles/tree/main/agents/.agents/local-skills/writing-markdown
Command: npx skills add https://github.com/LinoWhy/.dotfiles --skill writing-markdown-linowhy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Markdown authors often encounter misaligned ASCII art box diagrams when the content includes CJK characters, leading to inconsistent rendering and readability issues.

Core Features & Use Cases

  • Detect misaligned ASCII box borders inside code blocks and suggest precise fixes.
  • Preserve alignment for mixed ASCII/CJK content across all lines with uniform display width.
  • Integrate into existing workflows via a simple validation step before final formatting.

Quick Start

Run the check_alignment.py script on your Markdown files to verify and enforce ASCII art box alignment.

Frequently Asked Questions about writing-markdown

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix misaligned ASCII art boxes in Markdown with CJK characters?

To fix misaligned ASCII art boxes in Markdown with CJK characters, you need to ensure all box borders have equal display width. This process uses a Python utility to measure East Asian width and reports misaligned lines for correction.

Why does my Markdown ASCII box rendering break when mixing English and CJK text?

Markdown ASCII box rendering breaks because CJK characters typically occupy two terminal columns while ASCII characters occupy one. Maintaining uniform display width across mixed content requires calculating East Asian width to preserve alignment.

How do I check Markdown files for ASCII box alignment issues?

You can check Markdown files for ASCII box alignment issues by running a validation script. This script measures the display width of box borders inside code blocks and reports any misaligned lines for correction.

Does this ASCII box alignment method work without external dependencies?

Yes, this ASCII box alignment method works without external dependencies. It uses a small standalone Python utility to calculate East Asian width and verify that box borders maintain consistent terminal rendering.

What is the best way to align ASCII diagrams in Markdown for consistent terminal rendering?

The best way to align ASCII diagrams in Markdown for consistent terminal rendering is to enforce uniform display width across all lines. A validation step measures East Asian width to detect and correct misaligned box borders.