-
Notifications
You must be signed in to change notification settings - Fork 158
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
Markups symbols not working in lib #259
Comments
Which version are you using, and does other markup work with it? |
This repo, the latest version from the main branch. I just find out that links do not work too. Heading works as expected. Cmake. |
The format of flags has changed in version 3 (I'm working on the documentation rn) and mkd_flag_t is no longer a scalar, but a pointer to a flags blob. It's possible that this is the bug. Are you doing anything with the headers for c++? I'm going to build a little testcase for this, and want to try and duplicate your code to do it. |
Yes i use a basic c++ wrapper, (part of that is your c++ from documentation here) #ifndef _MKDIO_CXX
#define _MKDIO_CXX
#include <iostream>
#include <string>
extern "C" {
#include <stdio.h>
#include "discount/mkdio.h"
}
class MKIOT {
protected:
void *mmiot;
MKIOT() { mmiot = 0; } /* dummy initializer */
public:
MKIOT(const char *text, int size, int flags) { mmiot = mkd_string(text, size, &flags); }
~MKIOT() { mkd_cleanup(mmiot); }
/**
* Generates html to c string (char*)
* @param flags
* @return pointer to char array
*/
char *genHtml(int flags = 0);
/**
* Generates html to dynamic std::string, automaticly compile
* @param flags
* @return html content
*/
std::string genHtmldynStr(int flags = 0);
};
#endif/*_MKDIO_CXX*/ mkdio++.cc //
// Created by jvlk on 10.9.22.
//
#include "mkdio++.h"
char *MKIOT::genHtml(int flags) {
mkd_compile(mmiot, &flags);
char *text;
mkd_document(mmiot, &text);
return text;
}
std::string MKIOT::genHtmldynStr(int flags) {
return std::string(genHtml(flags));
} |
Oh for pete's sake I forgot to update it. Goddamn. It doesn't explain why it's not working for you, but I need to update the class to be compatible with the v3 published interface. |
Does v3 discount have flag for disabling bold text,links etc? Or this should be case? I've try to use older version and with that i have no issues. So my only explanation is that i make same mistake with flags. Or did yiu have some others idea? |
Ugh. I dropped my reply to this on the floor; I don't think I've ever had an option to disable text formatting; are you thinking of the MKD_SAFELINK option that checks for well-known protocols? |
Hi, I'm using discount as a library. I have issues with markdown content in markups (bolt text, italics text). Generation is not working for this content. I am not using any flag. Can you help what i'am doing wrong?
This is the function what i'am using:
**bold text**
-> **bold text**The text was updated successfully, but these errors were encountered: