Skip to content

feat: add markdown_to_html Handlebars helper#55

Merged
joeltjames merged 1 commit intomainfrom
jt/markdown-to-html-helper
Feb 26, 2026
Merged

feat: add markdown_to_html Handlebars helper#55
joeltjames merged 1 commit intomainfrom
jt/markdown-to-html-helper

Conversation

@joeltjames
Copy link
Collaborator

@joeltjames joeltjames commented Feb 25, 2026

Summary

  • Adds a markdown_to_html Handlebars helper that converts Markdown to Asana-compatible HTML for use in html_notes fields
  • Uses marked to parse Markdown, then applies post-processing to conform to Asana's supported HTML subset: downgrades h3-h6 to h2, strips images, replaces <del> with <s>, removes unsupported attributes, unwraps details/summary blocks, and normalizes table markup
  • Adds marked as a production dependency and bumps several @actions/* packages

This address issue #47

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Handlebars helper to convert Markdown into Asana-compatible HTML for html_notes, and updates dependencies/build artifacts to support the feature.

Changes:

  • Added markdown_to_html helper using marked + regex post-processing to conform (roughly) to Asana’s HTML subset.
  • Added/updated documentation describing usage of markdown_to_html vs sanitize_markdown and notes vs html_notes.
  • Added marked dependency, bumped several toolchain deps, updated lockfile and distribution artifacts, and added tests.

Reviewed changes

Copilot reviewed 4 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/expression/helpers.ts Registers new markdown_to_html helper and implements Markdown→HTML conversion + Asana compatibility post-processing.
tests/expression/helpers.test.ts Adds coverage for markdown_to_html conversions (headings, lists, links, code, images, details, tables, etc.).
package.json Adds marked as a production dependency.
bun.lock Updates resolved dependency graph for marked and @actions/* bumps.
docs/reference/helpers/text-processing.md Documents markdown_to_html usage and guidance for notes vs html_notes.
dist/licenses.txt Adds license text for marked into bundled license output.
dist/expression/helpers.d.ts.map Updates generated declaration map for helper changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Converts PR body markdown to Asana-compatible HTML, handling headings
(h3-h6 downgraded to h2), lists, links, tables (normalized to
table/tr/td), strikethrough (del→s), code blocks (class stripped),
image stripping, details unwrapping, and HTML comment removal.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@joeltjames joeltjames force-pushed the jt/markdown-to-html-helper branch from 4faa04b to 4977ee8 Compare February 26, 2026 00:37
@joeltjames joeltjames merged commit b4c12f8 into main Feb 26, 2026
@joeltjames joeltjames deleted the jt/markdown-to-html-helper branch February 26, 2026 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants