Line Breaks and WikiTree Markup

+2 votes
84 views

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

asked in WikiTree Tech by John Gilroy G2G1 (1.3k points)
retagged by Ellen Smith

3 Answers

+5 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.
answered by RJ Horace G2G6 Pilot (442k points)
edited by RJ Horace

See the following for more on syntax

https://www.wikitree.com/wiki/Help:Editing_Tips

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).
+4 votes
Replacle

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

with

=== Timeline ===

for a level three heading, breaks not needed.

It used to be that  a colon (:) would indent one , two , 2 etc.
answered by Tom Bredehoft G2G6 Pilot (188k 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.
+5 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

John

answered by John Gilroy G2G1 (1.3k 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

+11 votes
3 answers
138 views asked Jan 3 in The Tree House by Steven Harris G2G6 Pilot (182k points)
+4 votes
2 answers
97 views asked Sep 8, 2018 in WikiTree Help by Sheena Tait G2G6 Mach 3 (36.2k points)
+11 votes
4 answers
+3 votes
4 answers
123 views asked Oct 30, 2018 in Policy and Style by Skip Magyar G2G6 Mach 1 (10.1k points)
+3 votes
1 answer
+3 votes
1 answer
81 views asked Sep 18, 2018 in WikiTree Help by Teresa Davis G2G6 Mach 1 (11.7k points)

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

disclaimer - terms - copyright

...