Jump to content

[Bug] Preformatted Code Blocks


Kai Team

Recommended Posts

Two bugs actually:

 

1) The Preformatted Code Block does not work unless the code block is preceded by a line of text and a blank line (in other words, you cannot start a log with a preformatted code block, as when logging something where you want columns of information aligned.

 

85541b64554c8e23f7d26b06ef52be7a.png

 

Since the Geocaching.com implementation of Markdown does not permit tables, this is the only way to present, for example, a formatted list of caches in a log.

 

2) If a log is edited to change the Markdown, the changes are not rendered when the edited log is posted (I discovered this testing for the above bug, and assume it may apply to other or all edited logs).

 

Thanks for addressing this.

Link to comment
Preformatted Code Block does not work unless the code block is preceded by a line of text and a blank line

 

You're getting it work at all? It's not one of Markdown widgets being offered.

 

The Markdown offered is bold, italic, a unique Quote function, link, horizontal line, 3 Headers, numbered and bullet point lists.

 

In the log text box, if you Tab, text in the box will show as shifted over. But the preview doesn't show indention, because it's not supported. I noticed that sometimes text behind the Tab will have a font change as rendered. I think it switches from Verdana to Lucida Console.

Edited by palmetto
Link to comment
It's not one of Markdown widgets being offered.

The Markdown offered is bold, italic, a unique Quote function, link, horizontal line, 3 Headers, numbered and bullet point lists.

I'm not sure where you got your list, but my understanding is that it is supported - Groundspeak said that they are supporting Markdown as described by the "How to Format" link on this page, with some exceptions (e.g. they are not supporting things under Extra Mode). Preformatted code block is not one of the exceptions mentioned by Groundspeak. BTW, I'm using 4 spaces, not a tab, but it sounds like either will work, since you are sometimes seeing font changes following a tab. I suspect it is sometimes because of the issue I reported above - it only works if there is a line of text and a blank line before the line with four spaces or a tab.

Edited by Kai Team
Link to comment

Two bugs actually:

 

1) The Preformatted Code Block does not work unless the code block is preceded by a line of text and a blank line (in other words, you cannot start a log with a preformatted code block, as when logging something where you want columns of information aligned.

 

85541b64554c8e23f7d26b06ef52be7a.png

 

Since the Geocaching.com implementation of Markdown does not permit tables, this is the only way to present, for example, a formatted list of caches in a log.

 

2) If a log is edited to change the Markdown, the changes are not rendered when the edited log is posted (I discovered this testing for the above bug, and assume it may apply to other or all edited logs).

 

Thanks for addressing this.

 

1) Based on the original Markdown spec I would expect that the code blocks need to have a blank line above them (when they are not on the first line) so this seems to be working as intended. However, it does appear that something is not working as expected when adding the code block on the first line. It seems that the preview is showing the code block correctly when it appears on the first line, but the spacing is being lost when the log is posted causing it to no longer render correctly.

 

2) Is the loss of spacing on the first line code block what you are referring to here?

 

I will open a ticket for the team to look into why the code block formatting is being lost on the first line. Thanks!

Link to comment

Thanks for pointing this out, I didn't know it was available. I do see it working, as you say, provided there's a line of text and a space above it.

Highlight the block, hit Tab+ Tab and I get indented text with a font change (Lucida Console).

Applying Bullet formatting to the block brings the font back to normal output. Just an observation.

 

2) If a log is edited to change the Markdown, the changes are not rendered when the edited log is posted

 

I mostly see editing the Markdown does work, except every once in a while, the original Markdown seems to persist, still formatting the output after it's been removed. For me this has been rare.

 

Possibly if there's a fix for, "loss of spacing when the Code Block is the first line", that will address the font change as well.

Edited by palmetto
Link to comment

It appears the problem with rendering Markdown on the first line of a log has been fixed! Kudos to Groundspeak for a quick fix! :D

 

Applying Bullet formatting to the block brings the font back to normal output. Just an observation.

This is how preformatted code blocks work in Markdown - i.e. everything within a preformatted code block is interpreted literally - i.e. you cannot "nest" Markdown within a preformatted code block as you could with BBCode, and if you try, it will either be rendered literally or it will terminate the preformatted code block, depending on what you are trying to nest.

 

That's why it would be nice to have tables in the Geocaching.com implementation of Markdown - AFAIK, you can use other Markdown (e.g. emphasis, links) within a Markdown table, so we would be able to duplicate what we used to be able to do in BBCode Code blocks. I'm hoping that Markdown tables may be on the list once the initial implementation of Markdown settles down. ;)

Edited by Kai Team
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...