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

Add underline support #14

Closed
Bartemis opened this issue Jan 17, 2023 · 3 comments
Closed

Add underline support #14

Bartemis opened this issue Jan 17, 2023 · 3 comments

Comments

@Bartemis
Copy link

Would be nice to add underline support.
To do it now you can use the following code:

import jira2markdown
from jira2markdown.elements import MarkupElements
from jira2markdown.markup.text_effects import QuotedElement, Underline

text = "This is a +test+"


class CustomUnderline(QuotedElement):
    TOKEN = "+"
    QUOTE_CHAR = "<u>"
    END_QUOTE_CHAR = "</u>"


elements = MarkupElements()
elements.replace(Underline, CustomUnderline)

print(jira2markdown.convert(text, elements=elements))
@catcombo
Copy link
Owner

Hi @Bartemis, thank you for you proposal. Could you please test updated code with your test cases before I publish it? See #15

@Bartemis
Copy link
Author

Bartemis commented Feb 3, 2023

Hi @catcombo, I test this with success

@catcombo
Copy link
Owner

catcombo commented Feb 3, 2023

@Bartemis great, thank you! I'll merge the PR and will publish a new version.

@catcombo catcombo closed this as completed Feb 3, 2023
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

No branches or pull requests

2 participants