-
Notifications
You must be signed in to change notification settings - Fork 157
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
base: master
Are you sure you want to change the base?
Conversation
- 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> |
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.
Can we remove the leading and trailing whitespaces on this?
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.
Thinking about it twice, why not remove the whole paragraph? It should show up in Confluence with the proper macro anyway. WDYT @prokod ?
rightNode := node.NextSibling().(*ast.Text) | ||
|
||
title := string(midNode.Value(source)) | ||
sanitizedTitle := strings.Replace(strings.ToLower(title), "!", "", -1) |
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.
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?
Looking a bit further into it, I wonder if a Transformer might be the best to use: https://codeberg.org/forgejo/forgejo/src/branch/forgejo/modules/markup/markdown/callout/github.go |
Closes #537