Loading...
 
Features / Usability

Features / Usability


How to display the text "{{bbox}}" in a tiki-wiki 21LTS?

posts: 55

Wow, @Bernard Sfez / Tiki Specialist, that actually works!

Next problem: I want to use it inside {CODE(mediawiki="0")}{CODE}. Unfortunately, if I use ~ np ~ inside it, everything inside ~ np ~ is transormed into a hash or something... so the first bracket { is displayed as a hash. If I use {CODE(mediawiki="1")}{CODE}, the ~ np ~ works as expected, but all my line breaks get messed up... :-(

I just want to put some code, preferredly without ANY changes to show up exactly as is in the source. I also want it to stand out a bit compared to normal text. Maybe there is a different/better tag to put my code into?

posts: 8633 Israel

I don't know how to do this... 😎
I tried different way and only by creating a screenshot I was able to display it.


posts: 126886 United Kingdom
FootlooseTraveller wrote:
...I want to use it inside {CODE(mediawiki="0")}{CODE}. Unfortunately, if I use ~ np ~ inside it, everything inside ~ np ~ is transormed into a hash or something...


That's an old bug, i'm sure there's a ticket/wish for it somewhere. I tried a few times to fix it but failed - if you can find the bug do update it with current version numbers and it might get some attention (one day)


posts: 2428 Czech Republic

Try this:

Copy to clipboard
{MARKDOWN()}`~np~{~/np~{bbox}}`{MARKDOWN}

Result:

{{bbox}}


Or this:

Copy to clipboard
{CODE(mediawiki="0")}~np~{~/np~{bbox}}{CODE}

Result:
Copy to clipboard
{{bbox}}

FootlooseTraveller wrote:

Wow, @Bernard Sfez / Tiki Specialist, that actually works!

Next problem: I want to use it inside {CODE(mediawiki="0")}{CODE}. Unfortunately, if I use ~ np ~ inside it, everything inside ~ np ~ is transormed into a hash or something... so the first bracket { is displayed as a hash. If I use {CODE(mediawiki="1")}{CODE}, the ~ np ~ works as expected, but all my line breaks get messed up... :-(

I just want to put some code, preferredly without ANY changes to show up exactly as is in the source. I also want it to stand out a bit compared to normal text. Maybe there is a different/better tag to put my code into?

posts: 55
luciash d' being 🧙 wrote:

Try this:

Copy to clipboard
{MARKDOWN()}`~np~{~/np~{bbox}}`{MARKDOWN}

Result:

{{bbox}}


I played around with this a bit. It works for a one-liner. If I break the line it is still a one-liner. If I break the line twice (double-line-break), it does not work anymore. I need something where I can just put my code and have line breaks and indents with spaces preserved and not interpreted anything.

luciash d' being 🧙 wrote:

Or this:

Copy to clipboard
{CODE(mediawiki="0")}~np~{~/np~{bbox}}{CODE}

Result:
Copy to clipboard
{{bbox}}


Seems like this got fixed. My result in tiki 21 LTS:

Copy to clipboard
§aeb5a97041fb1f1066934b573e35aec4§{bbox}}


So this would be my best solution by now. I would have to do a minor change to my code (not many double curly brackets there) and wait for tiki 24 LTS. That is OK for me as this code thingy is on a private part of my wiki. It is only for myself, nobody else sees it. Thanks.

posts: 2428 Czech Republic

In Markdown syntax to put multi-line code you need to use three backticks around: ```

luci

FootlooseTraveller wrote:
I played around with this a bit. It works for a one-liner. If I break the line it is still a one-liner. If I break the line twice (double-line-break), it does not work anymore. I need something where I can just put my code and have line breaks and indents with spaces preserved and not interpreted anything.
posts: 55
luciash d' being 🧙 wrote:

In Markdown syntax to put multi-line code you need to use three backticks around: ```
luci


WOW! THIS IS IT! THIS IS THE ANSWER! Thank you so much!