-
Notifications
You must be signed in to change notification settings - Fork 20
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
base: trunk
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,7 +101,7 @@ | |
(diary-sexpexample-block . (lambda (&rest args) (ox-jira--not-implemented 'diary-sexpexample-block))) | ||
(drawer . (lambda (&rest args) (ox-jira--not-implemented 'drawer))) | ||
(dynamic-block . (lambda (&rest args) (ox-jira--not-implemented 'dynamic-block))) | ||
(entity . (lambda (&rest args) (ox-jira--not-implemented 'entity))) | ||
(entity . ox-jira-entity) | ||
(example-block . ox-jira-example-block) | ||
(export-block . (lambda (&rest args) (ox-jira--not-implemented 'export-block))) | ||
(export-snippet . (lambda (&rest args) (ox-jira--not-implemented 'export-snippet))) | ||
|
@@ -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")) | ||
(link . ox-jira-link) | ||
(node-property . (lambda (&rest args) (ox-jira--not-implemented 'node-property))) | ||
(options . (lambda (&rest args) (ox-jira--not-implemented 'options))) | ||
|
@@ -145,7 +145,7 @@ | |
(timestamp . ox-jira-timestamp) | ||
(underline . ox-jira-underline) | ||
(verbatim . ox-jira-verbatim) | ||
(verse-block . (lambda (&rest args) (ox-jira--not-implemented 'verse-block)))) | ||
(verse-block . ox-jira-verse-block)) | ||
:filters-alist '((:filter-parse-tree . ox-jira-fix-multi-paragraph-items)) | ||
:options-alist '((:src-collapse-threshold nil nil ox-jira-src-collapse-threshold)) | ||
:menu-entry | ||
|
@@ -194,6 +194,12 @@ CONTENTS is nil. INFO is a plist used as a communication | |
channel." | ||
(format "{{%s}}" (org-element-property :value code))) | ||
|
||
(defun ox-jira-entity (entity _contents info) | ||
"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)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
|
||
(defun ox-jira-example-block (example-block contents info) | ||
"Transcode an EXAMPLE-BLOCK element from Org to Jira. | ||
CONTENTS is nil. INFO is a plist holding contextual | ||
|
@@ -344,6 +350,12 @@ CONTENTS is nil. INFO is a plist used as a communication | |
channel." | ||
(format "{{%s}}" (org-element-property :value verbatim))) | ||
|
||
(defun ox-jira-verse-block (_verse-block contents info) | ||
"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)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 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.) |
||
|
||
(defun ox-jira-paragraph (paragraph contents info) | ||
"Transcode a PARAGRAPH element from Org to JIRA. | ||
CONTENTS is the contents of the paragraph, as a string. INFO is | ||
|
@@ -375,7 +387,7 @@ the plist used as a communication channel." | |
CONTENTS holds the contents of the src-block. INFO is a plist holding | ||
contextual information." | ||
(when (org-string-nw-p (org-element-property :value src-block)) | ||
(let* ((title (apply #'concat (org-export-get-caption src-block))) | ||
(let* ((title (or (car (org-export-get-caption src-block)) "")) | ||
(lang (org-element-property :language src-block)) | ||
(lang (if (member lang ox-jira-src-supported-languages) lang "none")) | ||
(code (org-export-format-code-default src-block info)) | ||
|
There was a problem hiding this comment.
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?