Markdown extensions option/setting #634

Closed
opened 2025-11-02 03:31:02 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @ncwgf on GitHub (Apr 10, 2017).

Gitea Version: 1.1.0+115-g54f0293f (docker image)

When I go to russross/blackfriday to check markdown syntax, just found gitea cannot use Definition lists

Term
: This is a term

I found that there are two usage of
markdown/markdown.go#L148
markdown/markdown.go#L159

if flags&blackfriday.LIST_TYPE_DEFINITION != 0 {

but markdown.go do not included EXTENSION_DEFINITION_LISTS at extension setup by default
and no way to enable it like EXTENSION_HARD_LINE_BREAK by checking
markdown/markdown.go#L619

setting.Markdown.EnableHardLineBreak

After checking code and compare extension list
https://github.com/russross/blackfriday/blob/master/markdown.go

There still have few extension not enabled
will there any way to let us config to enable them like EnableHardLineBreak? or
are there any concern to not let it enable?

Originally created by @ncwgf on GitHub (Apr 10, 2017). Gitea Version: 1.1.0+115-g54f0293f (docker image) When I go to [russross/blackfriday](https://github.com/russross/blackfriday) to check markdown syntax, just found gitea cannot use **Definition lists** ``` Term : This is a term ``` I found that there are two usage of [markdown/markdown.go#L148](https://github.com/go-gitea/gitea/blob/0602a44b276b009c1f7eb65c589ec284ef4131cf/modules/markdown/markdown.go#L148) [markdown/markdown.go#L159](https://github.com/go-gitea/gitea/blob/0602a44b276b009c1f7eb65c589ec284ef4131cf/modules/markdown/markdown.go#L159) > if flags&blackfriday.LIST_TYPE_DEFINITION != 0 { but `markdown.go` do not included `EXTENSION_DEFINITION_LISTS` at extension setup by default and no way to enable it like `EXTENSION_HARD_LINE_BREAK` by checking [markdown/markdown.go#L619](https://github.com/go-gitea/gitea/blob/0602a44b276b009c1f7eb65c589ec284ef4131cf/modules/markdown/markdown.go#L619) > setting.Markdown.EnableHardLineBreak After checking code and compare extension list https://github.com/russross/blackfriday/blob/master/markdown.go There still have few extension not enabled will there any way to let us config to enable them like `EnableHardLineBreak`? or are there any concern to not let it enable?
GiteaMirror added the issue/confirmedtype/enhancement labels 2025-11-02 03:31:02 -06:00
Author
Owner

@bkcsoft commented on GitHub (Apr 18, 2017):

Should be fairly simple to add a flag for it

@bkcsoft commented on GitHub (Apr 18, 2017): Should be fairly simple to add a flag for it
Author
Owner

@stale[bot] commented on GitHub (Feb 15, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Feb 15, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@stale[bot] commented on GitHub (Mar 1, 2019):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (Mar 1, 2019): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Author
Owner

@rkoe commented on GitHub (Mar 17, 2019):

  • Is there any progress in this? Or should an external markdown-renderer be used?

  • Would it be possible to enable the "EXTENSION_DEFINITION_LISTS" by default? I think that (a) it would be a useful extension and (b) enabling it shouldn't have any negative effects when not used.

    I could create a pull request for this, if there's a chance for it to get merged.

@rkoe commented on GitHub (Mar 17, 2019): - Is there any progress in this? Or should an external markdown-renderer be used? - Would it be possible to enable the "EXTENSION_DEFINITION_LISTS" by default? I think that (a) it would be a useful extension and (b) enabling it shouldn't have any negative effects when not used. I could create a pull request for this, if there's a chance for it to get merged.
Author
Owner

@lunny commented on GitHub (Mar 18, 2019):

@rkoe please send a pull request.

@lunny commented on GitHub (Mar 18, 2019): @rkoe please send a pull request.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#634