feat: add markdown_to_html Handlebars helper#55
Merged
joeltjames merged 1 commit intomainfrom Feb 26, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
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_htmlhelper usingmarked+ regex post-processing to conform (roughly) to Asana’s HTML subset. - Added/updated documentation describing usage of
markdown_to_htmlvssanitize_markdownandnotesvshtml_notes. - Added
markeddependency, 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>
4faa04b to
4977ee8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
markdown_to_htmlHandlebars helper that converts Markdown to Asana-compatible HTML for use inhtml_notesfieldsmarkedto parse Markdown, then applies post-processing to conform to Asana's supported HTML subset: downgradesh3-h6toh2, strips images, replaces<del>with<s>, removes unsupported attributes, unwraps details/summary blocks, and normalizes table markupmarkedas a production dependency and bumps several @actions/* packagesThis address issue #47