Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some fixes and extra support #52

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from

Conversation

jeremy-compostella
Copy link

These patches addresses:

  1. A systematic crash in `ox-jira-src-block' with the C source block with captions
  2. The missing the verse block support
  3. The missing entity support
  4. The missing line break support

Signed-off-by: Jeremy Compostella <[email protected]>
Signed-off-by: Jeremy Compostella <[email protected]>
I was getting a crash in the `concat' call of the `ox-jira-src-block'
function on all my C src blocks.  It turns out that
`org-export-get-caption' is assuming that all the elements of the
returned list are strings.  It seems that only the first one is a
string.

Signed-off-by: Jeremy Compostella <[email protected]>
Handle verse blocks as Reformatted JIRA block.

Signed-off-by: Jeremy Compostella <[email protected]>
@stig
Copy link
Owner

stig commented Sep 18, 2020

Hello! Thank you for contributing!

I want to start by apologising for taking so long to get back to you on this PR. I appear to have accidentally unsubscribed from this repo at some point. I'm now watching it, so should be able to keep up with requests.

Regarding the PR itself:

  1. The file you have touched is actually generated from the real source, found in the ox-jira.org file. That is an literate programming document, which is tangled to the ox-jira.el. Would you be open to add your changes to the ox-jira.org file? If it proves troublesome, I'm happy to help.

  2. Are you able to add token tests for the changes you're making? There's no literate document for the tests, so that should be a bit easier.

@@ -119,7 +119,7 @@
(keyword . (lambda (&rest args) ""))
(latex-environment . (lambda (&rest args) (ox-jira--not-implemented 'latex-environment)))
(latex-fragment . (lambda (&rest args) (ox-jira--not-implemented 'latex-fragment)))
(line-break . (lambda (&rest args) (ox-jira--not-implemented 'line-break)))
(line-break . (lambda (&rest args) "\n\n"))
Copy link
Owner

Choose a reason for hiding this comment

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

According to https://jira.atlassian.com/secure/WikiRendererHelpAction.jspa?section=breaks \\ should create a linebreak. I think that might be more accurate than \n\n, which appears to be a paragraph break?

"Transcode a VERSE object from Org to Jira.
CONTENTS is verse block contents. INFO is a plist holding
contextual information."
(replace-regexp-in-string "^\\\(.*\\\)$" "{{\\1}}" contents))
Copy link
Owner

Choose a reason for hiding this comment

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

If I understand correctly this will render each line in monospaced font. WDYT about an explicit linebreak (using \\ at the end of each source line instead? That should have the same effect. Might also want to wrap it in a panel.

Although, I think JIRA keeps linebreaks, so you may be able to get away with just passing it through as-is. (I remember having to add code to the paragraph handler to remove linebreaks from the input for this reason.)

"Transcode a CODE object from Org to JIRA.
CONTENTS is nil. INFO is a plist used as a communication
channel."
(org-element-property :utf-8 entity))
Copy link
Owner

Choose a reason for hiding this comment

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

🤔 What does this actually do? A test would really help here, as I don't know what this is for.

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