Solved: Set 'fenced code blocks' and 'preformatted text blocks' to wrap lines

This used to be the default, and I’m assuming this changed due to an update to Discourse, but fenced code blocks used to wrap long lines so that the entire thing would be visible at once. Now it does not do that so that you have to scroll to see a long single line of relevance.

I definitely do not prefer it the way it is now. I’d much rather see everything at once.

See an example here: The way Session Relevance statements (WebReports) are written matters

1 Like

I agree. I do much if my Forum reading on an iPad, and the new formatting for the Block Quotes makes reading relevance difficult.

1 Like

Especially considering relevance is usually just a single line.

You can just put your relevance in a relevance tag – though that doesn’t help all the existing posts using the pre-formatted text tags

```` your text here ````

test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test

2 Likes

That doesn’t seem to do syntax highlighting.

I’d prefer the syntax highlighting to work for both pre-formatted blocks and fenced code blocks and I want both to wrap.

1 Like

On my iPad the main problem I have is that I can only see a fragment of the code, and I have to scroll “within” the block to read the code. I usually find is easier to select all the code copy it and paste it into a different app to read the actual relevance.

1 Like
Windows Of Operating System

It doesn’t look like my iPad keyboard has the “backtick” character. I only have the apostrophe. Being a Gen2 iPad, I don’t want to upgrade to the latest iOS version for performance reasons, so I’m stuck using the “4spaces” method.

1 Like

Ok, I made this change to the CSS for pre blocks. We’re probably making a trade off here with how nicely javascript code or XML examples can be exchanged, but we’ll see if it is a problem. This style change is not supported on IE 7 and earlier, so hopefully there is no one still using those moldy browsers.

2 Likes

I also enabled syntax highlighting by default :smile:

1 Like

Nice. It does seem to be working:

names of fixlets whose(name of it does not contain "(Superseded)" AND name of it as lowercase contains "endpoint manager" AND name of it as lowercase contains "client" AND globally visible flag of it AND ( (it >= (it as version) of preceding text of first "." of (it as string) of maximum of (it as version) of agent versions of bes computers) of (it as version) of following text of last "-" of name of it ) ) of bes sites whose("BES Support" = name of it)

I believe that highlight.js that is used by discourse should detect the language, but I don’t know the specifics of what is happening or what change was made.

testing xml: (seems correct)

<?xml version="1.0" encoding="UTF-8"?>
<BES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BES.xsd">
	<Fixlet>
		<Title>Open current BES Client Log file - LogExpert - Windows</Title>
	</Fixlet>
</BES>

syntax highlighting by default is really great, especially since it applies to the vast majority of what is shared on this forum.

Thanks!