Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5965785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:41:15+00:00 2026-05-22T19:41:15+00:00

Update I’m trying to create a simple Go function which will simply take in

  • 0

Update


I’m trying to create a simple Go function which will simply take in a string of reddit-style Markdown and return the appropriate HTML.

Right now, I know that having Discount installed is a prerequisite and that at least the following three files are used by reddit as wrappers around Discount:

  • https://github.com/reddit/reddit/blob/master/r2/r2/lib/c/reddit-discount-wrapper.c

  • https://github.com/reddit/reddit/blob/master/r2/r2/lib/c_markdown.py

  • https://github.com/reddit/reddit/blob/master/r2/r2/lib/py_markdown.py

Based on this, does anyone know how I can sort of glue all this together with Cgo and go-python to create a simple Markdown function? (independent of the rest of the reddit source code)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T19:41:16+00:00Added an answer on May 22, 2026 at 7:41 pm

    If all you want is Markdown, I don’t see how Python fits into this. Maybe there’s more to it, but if at all possible you should leave Python out of this. If there’s a reason to use Python that wasn’t in the question, I can edit this answer and address that.

    First, try this native Go Markdown package: https://github.com/knieriem/markdown

    If that doesn’t work, the next easiest thing is to take Discount (or any other Markdown library written in C, such as GitHub’s Upskirt fork) and wrap it with cgo or SWIG.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

public static bool CheckLogin(string Username, string Password, bool AutoLogin) { bool LoginSuccessful; // Trim
UPDATE : Answer at the bottom. Hi Guys, How to initialize an 'array of
UPDATE: After adding the suggested methodes ( doBindService() and doUnbindService() ) along with calls
UPDATE users u JOIN (select count(*) as job_count, user_id from job_responses where date_created >
UPDATE `company` SET `itnumber` = '595959' WHERE (id = 932) So the value of
UPDATE: Please see https://softwarerecs.stackexchange.com/questions/71464/java-library-to-insert-invisible-text-into-a-pdf instead. I want to insert invisible text into an existing
Update : It turns out I had (hidden away in my POCO objects) a
Update: It's not really necessary to remove added scripts considering once they run you
Update : I have a couple of what are probably silly questions about commenter
UPDATE: Skip to the answer if you want to save yourself the lengthy preamble.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.