J2M
J2M copied to clipboard
Jira numbered lists do not translate to github numbered lists
Hi! This is awesome, and I super appreciate the work. Could numbered lists support be added?
For instance, JIRA Markdown:
# First item
# second item
Should be translated to Github markdown:
1. First item
1. Second item
As a work around until this is merged, you can do something like this to preprocess the numbered lists:
#!/bin/bash
# Preserve whitespace
IFS='🍔'
JIRA_MARKDOWN_WITH_NUMBERED_LIST=$(cat jira_markdown.md | sed -E 's/^([\t| ]*)(# )([-\w]*)?/\11. \3/p')
GITHUB_MARKDOWN=$(echo "${JIRA_MARKDOWN_WITH_NUMBERED_LIST}" | j2m --toM --stdin)
#back to Regular whitespace behavior
unset IFS
echo "${GITHUB_MARKDOWN}"
Is anyone else looking at this? I've added the relevant logic to my fork (J > M, and M > J) and am happy for feedback on my changes: https://github.com/harleys-hmh/J2M/pull/1/files
Apologies @StevenACoffman - just noticed your fork.
@harleys-hmh No worries. Mine wasn't bidirectional, and didn't have tests, so yours is probably better (I haven't tested it though). It looks like your pull request is pointing the wrong way though, as it's against your fork. Want to make a pull request against this repo for your improvement?
any progress on this?