Joplin doesn’t seem to have a problem that needs resolving and it works fine for me.
This is a simplified summary…
There is inline code which is where you surround a word or words within a line of text with a single backtick so `my phrase` gives my phrase
.
You can achieve the same for a line by indenting the line with four spaces or a tab so:
Shows as
my phrase
Neither of these has any kind of code highlighting. They are just pre-formatted text blocks.
There are also code blocks where you start with three backticks and end with three backticks, with the backticks being on their own line. This is a “fenced code block”. This enables you to mark swathes of text as code. This code block however can have code highlighting to make the code easier to read
Of course unless you specify what type of code you have “fenced” the interpreter can only guess so you can tell it by adding a keyword after the first set of three backticks.
For instance
```plaintext
will tell the interpreter that everything that follows up to the closing set of backticks is plain text. (The interpreter Joplin uses appears to use plaintext
whereas others, such as this forum, use text
.)
```bash
will tell the interpreter that everything that follows up to the closing set of backticks is a bash script and it will highlight the code as such.
So, in Joplin
```plaintext
#!/bin/bash
# declare STRING variable
STRING="Hello World"
#print variable on a screen
echo $STRING
```
Shows as
#!/bin/bash
# declare STRING variable
STRING="Hello World"
#print variable on a screen
echo $STRING
But
```bash
#!/bin/bash
# declare STRING variable
STRING="Hello World"
#print variable on a screen
echo $STRING
```
Shows as
#!/bin/bash
# declare STRING variable
STRING="Hello World"
#print variable on a screen
echo $STRING
(the colours may vary in Joplin to what you see above but it will basically do the the same thing)
Other keywords I have seen mentioned on the web include,
apache
bash
coffeescript
cpp
cs
css
diff
go
html
http
ini
java
javascript
json
makefile
markdown
nginx
objectivec
perl
php
plaintext
python
ruby
shell
sql
xml
I have not tried them all so I cannot say if the interpreter Joplin uses understands all of them. Just try it and see!
Of course if you just want to ensure all your fenced blocks are plain text just put plaintext
after the first three backticks and you are done.