Line Breaks and WikiTree Markup

+4 votes

Hi everyone, hopefully someone can help.  I keep my research on my own database and I am now adding profiles to WikiTree.  To save time consuming effort I generate text Biographies with sources programatically from the database and then paste them into the profile biography and source area.  All the text goes in ok, and the embedded sources inserted correctly.

My issue is with line breaks and wikitree markup.  The pasted text "<br/> *Archbald" produces a line break ok but does not indent the Archbald as a list.  Also the text "<br/> <br/>=== Timeline ===<br/> <br/>" produces double line break ok but does not produce a level 3 heading.

I have tried various combination of removing spaces adding space nd so on to no avail.

I can go through the text and manually remove the <br/>'s and insert double carriage returns and then the markup all works ok.

So what I am doing wrong??

Thanks Johnfrown

in WikiTree Tech by John Gilroy G2G2 (2.0k points)
retagged by Ellen Smith

3 Answers

+7 votes
Best answer
Wikitext is different from HTML - it doesn't ignore line breaks and white space in the input.

Various markup codes like * # { = only work at the first character of a line (or sometimes as the first character of a table cell).  They're defeated even by a single space in front.

Linefeeds in the input are also used to terminate indents and other things, since there aren't any "end" tags except }.

And a double linefeed makes a paragraph break.

However, a single linefeed is treated as a space, or ignored, if there's nothing special for it to do.  That's about the only time you need <br/> - to create a line break without a vertical gap.
by Anonymous Horace G2G6 Pilot (568k points)
edited by Anonymous Horace

See the following for more on syntax

Thanks for your response, I am generating the text programmatically so if I can't use <br/> what do I use so signify the  start of a new line?
Try <br /> or if that doesn't work <br>

One of the goals of Wikitree is to keep it simple. Consider using a double return that will separate paragraphs, but leave a blank space. Otherwise, I think you have to use a bulleted list (*) which includes an indent, numbered list (#) also an indent, or the colon (:) which leaves the smallest indent, but does create a list. You can also make more of an indent by using two or more :

Do you have an example of a profile you have created? I use Legacy and have formatted all my sources to make them Wikitree friendly.
The easiest way to start a new line is to enter two line breaks (carriage returns).
Thanks, Lucy.  I was wondering how to make the asterisk symbol appear without showing as a bullet.  I used your method and it now looks perfect.

Thanks again!

+6 votes

<br/>=== Timeline ===<br/>


=== Timeline ===

for a level three heading, breaks not needed.

It used to be that  a colon (:) would indent one , two , 2 etc.
by Tom Bredehoft G2G6 Pilot (194k points)
Thanks for your response but taking out the line breaks meant that the level 3 heading was ignore and the text continued with no line break at all.

Don't put your line break <br /> immediately before the === on the same line; put it at the end of the preceding line.  The header needs to be the first thing on the line, as does the * and the : to have them function correctly.

(If I don't want an asterisk to create a bullet point, I bold it with three ' which then leaves me with a * to denote a point from within text (kinda like a footnote).)

You have to break your output into lines using whatever your language uses to output CRLFs or equivalent.

I.e. it should look like handwritten wikitext before it's pasted in.
+7 votes

Thanks to every one who responded, it's been my "DOH" moment.  I've modified my software to generate a "\n" instead of a <br/> before each WikiTree markup and it all works correctly.

Definetely a senior momentsad


by John Gilroy G2G2 (2.0k points)
You may say senior moment John and I’ll say just simply a mistake/error. If it helps at all to I probably wouldn’t even be able to figure out how to use the program you are using. I am still getting a hang of how it’s done here.

Related questions

+7 votes
1 answer
105 views asked May 26 in WikiTree Tech by Liam Upton G2G1 (1.0k points)
+12 votes
3 answers
218 views asked Jan 3, 2019 in The Tree House by Steven Harris G2G6 Pilot (518k points)
+5 votes
2 answers
148 views asked Sep 8, 2018 in WikiTree Help by Sheena Tait G2G6 Mach 7 (74.1k points)
+12 votes
4 answers
+2 votes
2 answers
143 views asked Oct 29, 2019 in WikiTree Help by Lois Tilton G2G6 Pilot (130k points)
+6 votes
1 answer
+5 votes
2 answers
157 views asked Sep 25, 2019 in WikiTree Help by Chris Orme G2G6 Mach 1 (14.7k points)
+11 votes
2 answers
+5 votes
1 answer
+4 votes
2 answers

WikiTree  ~  About  ~  Help Help  ~  Search Person Search  ~  Surname:

disclaimer - terms - copyright