J2M icon indicating copy to clipboard operation
J2M copied to clipboard

Jira numbered lists do not translate to github numbered lists

Open StevenACoffman opened this issue 8 years ago • 4 comments

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

StevenACoffman avatar Feb 16 '17 19:02 StevenACoffman

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}"

StevenACoffman avatar Feb 17 '17 00:02 StevenACoffman

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 avatar Jun 20 '17 23:06 harleys-hmh

@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?

StevenACoffman avatar Jun 21 '17 02:06 StevenACoffman

any progress on this?

Vity01 avatar Oct 01 '19 12:10 Vity01