feat(jtk): add wiki markup detection and conversion#49
Conversation
Port wiki markup handling from jira-ticket-cli PR #63: - IsWikiMarkup() detects Jira wiki patterns (h1., {{code}}, etc.) - WikiToMarkdown() converts wiki to markdown format - Auto-detect wiki in MarkdownToADF() and convert first Supported patterns: headings, code blocks, monospace, links, images, blockquotes, bullet lists, horizontal rules, and more. Closes #37 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
TDD Quality Assessment for PR #49Overall Assessment: Good (with room for improvement)The PR demonstrates solid TDD practices with comprehensive test coverage for the core functionality. The tests are well-structured and follow the codebase's established patterns. 1. Test ComprehensivenessStrengths:
Coverage of documented patterns:
2. Edge Cases AnalysisCovered:
Missing edge cases:
3. Test Pattern ConsistencyConsistent with codebase:
Minor inconsistencies:
4. What's MissingHigh priority:
Medium priority: Nice to have: Recommendations
Example test to add: {
name: "text formatting strikethrough",
input: "This is -struck- text",
expected: "This is ~~struck~~ text",
},
{
name: "text formatting underline",
input: "This is +underlined+ text",
expected: "This is <u>underlined</u> text",
},SummaryThe tests are well-written and cover the primary use cases effectively. The table-driven approach and integration testing are excellent. The main gap is the complete lack of tests for the text formatting conversions (strikethrough, underline, subscript, superscript, citation) which represent ~45 lines of untested implementation code. Adding these tests would bring the PR to an excellent TDD standard. Score: 7.5/10 - Good coverage of core functionality, but text formatting and some edge cases need attention. |
Summary
IsWikiMarkup()function to detect Jira wiki markup patternsWikiToMarkdown()function to convert wiki markup to markdownMarkdownToADF()to auto-detect and convert wiki markup firstSupported patterns:
h1.throughh6.{code}...{code}and{code:lang}...{code}{{text}}[text|url]!image.png!and!image.png|alt=text!bq.and{quote}...{quote}* item,** nested{noformat}...{noformat}----Ports wiki markup handling from jira-ticket-cli PR #63.
Closes #37
Test plan
make buildpassesmake testpassesmake lintpassesIsWikiMarkup()with wiki and non-wiki contentWikiToMarkdown()with various patternsMarkdownToADF()🤖 Generated with Claude Code