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

User friendly blockquote title #538

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

prokod
Copy link
Contributor

@prokod prokod commented Dec 12, 2024

  • Instead of the not so nice Github Alerts notations

Closes #537

- Instead of the not so nice Github Alerts notations
@@ -49,38 +49,38 @@ <h2 id="Simple-Blockquote">Simple Blockquote</h2>
<h2 id="GH-Alerts-Heading">GH Alerts Heading</h2>
<h3 id="Note-Type-Alert-Heading">Note Type Alert Heading</h3>
<ac:structured-macro ac:name="info"><ac:parameter ac:name="icon">true</ac:parameter><ac:rich-text-body>
<p>[!NOTE]</p>
<p> Note </p>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we remove the leading and trailing whitespaces on this?

rightNode := node.NextSibling().(*ast.Text)

title := string(midNode.Value(source))
sanitizedTitle := strings.Replace(strings.ToLower(title), "!", "", -1)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of doing this on a character base, can we do it on a word base (i.e. look for the existing ghalerts with a [! in front and ] afterwards and then simply replace what you found?

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.

Github alerts MD blockquote conversion to Confluence box generates box title which is not so user friendly
2 participants