Jump to content

Line breaks in waypoint description


SN67

Recommended Posts

2 hours ago, SN67 said:

Isn't it possible to make line breaks in the waypoint descriptions? Html doesn't work (</br>) :( 

 

I just tried it myself to see what happens. You can press enter when editing the description and it creates a new line, but that isn't reflected in the description on the cache listing or when you click on the waypoint. A <br> seems to be interpreted and removed from the visible description, but still doesn't create a new line. Both the new line and the <br> are still there if you go in to edit the waypoint again, but they don't actually create a new line that's visible to other cachers.

Does anyone know if this worked before the new cache editing page came along? Caches around here generally have very short or empty waypoint descriptions, so it isn't something I would come across very often.

Link to comment

Well. I just looked at my caches. Some of my waypoints descriptions do contain line breaks (aka "press enter") and it just works.

For what it worths, waypoints description may be written in BBcode (this is not documented anymore, as far as I know). It is (was?) true even after the introduction of Markdown. But BBcode doesn't support line breaks. There could be a workaround (seen on an Ubuntu forum): try "[br]x[/br]". I'd rather not test by myself on my caches where "press enter" is still working... Tell us if this workaround does the trick! (See next post for solution).

If it doesn't, another solution is to use lists :

[list]
[*]Text before line break.
[*]Text after line break.
[/list]

Again, this is currently working on my caches' waypoints.

Edited by Tungstène
typo + added links to waypoints for illustration + stroke through incorrect suggestion.
Link to comment
15 hours ago, SN67 said:

Isn't it possible to make line breaks in the waypoint descriptions? Html doesn't work (</br>) :( 

 

That's actually an invalid tag.  A break tag is one of few html tags which  is self-closing rather than as separate opening and closing tags.  What you've shown would be the closing tag (without an opening tag).   Most browsers will parse an opening tag without a closing tag, but it's "technically" invalid.  

You can either use <br></br>    or <br />
 

 

 

Edited by NYPaddleCacher
Link to comment
4 hours ago, Tungstène said:

OK. I finally just tried for myself. Line breaks do not work for me anymore. But [br] alone works!


First line of waypoint's description.[br]
Second line of description.

This is how I made up this waypoint of mine.

Wow! Thanks. I love you  :) I would never have guessed to use the square tags around (instead of the pointed ones).

My knowledge to html is on a learning-by-doing basis, and I actually learned it in desire to make cache descriptions look better.

Link to comment
14 hours ago, The A-Team said:

Does anyone know if this worked before the new cache editing page came along? Caches around here generally have very short or empty waypoint descriptions, so it isn't something I would come across very often.

That was excactly what I seemed to remember. I think the change was made when the layout in the edit page was changed.

In this case I want to use it in a multi-cache. Not necessarily because of a long description, but it looks better, - and is easier to read. If e.g. there's three questions, it looks so much better to have one question per line.

Link to comment
1 hour ago, NYPaddleCacher said:

That's actually an invalid tag.  A break tag is one of few html tags which  is self-closing rather than as separate opening and closing tags.  What you've shown would be the closing tag (without an opening tag).   Most browsers will parse an opening tag without a closing tag, but it's "technically" invalid.  

You can either use <br></br>    or <br />
 

 

 

Well ... actually I DO normally use <br/> (without the space)  :D

Link to comment
3 hours ago, SN67 said:

My knowledge to html is on a learning-by-doing basis, and I actually learned it in desire to make cache descriptions look better.

Actually, it is not HTML but BBcode. When Groundspeak switched from BBcode to Markdown in logs, they maintained BBcode for waypoints descriptions (or they forgot about it). Therefore, nowadays, you'll have to know three different types of text formatting : HTML for cache description, BBcode for waypoint description and Markdown for log text. Hopefully, BBcode is close enough to HTML. 

Link to comment
6 hours ago, SN67 said:

Well ... actually I DO normally use <br/> (without the space)  :D

Yes, the space is optional.  According to the specification <br>,  <br />, and  <br/> are all valid "self closing" tags for a line break.  There is a subset of HTML tags which are called "void elements". They are basically tags which have no content between the opening and closing tags.  The two others that are very commonly used are the img tag and hr (horizontal rule).

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...