A
A
Arti-Jack2017-07-14 12:32:22
Android
Arti-Jack, 2017-07-14 12:32:22

How to output code using Markdown on Android?

I use Markdown in my project.
And I can't get the syntax highlighting code out.
I do it like this:

MarkdownView markdownView = (MarkdownView) findViewById(R.id.markdownView);
        markdownView.loadMarkdown("`var s = 1`");

and I don’t get the desired result:
8d90121603c9459e8dd47f2fb2b949c3.png
If, in general, the text is formatted not as source code, but just text, then there are no differences at all:
MarkdownView markdownView = (MarkdownView) findViewById(R.id.markdownView);
        markdownView.loadMarkdown("var s = 1");

1833a213bb70485a99631dbf552ea32c.png
If so, I want to achieve this:
b285dae9d5ca4936b074c38f6f0fa19c.png
What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2017-07-14
@zagayevskiy

As far as I know, it is necessary to frame ```.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question