Trimming whitespace characters at end of Free Space page causing format error

+7 votes

Hi WikiTree Tech:

Please take a look at this Free Space Page, on Kentucky Sources, here:

Scroll down to the bottom of the page. Notice that the last subheading there that is not formatted correctly:

====Woodford County====

The problem is that the wiki needs to have a Carriage Return character after the subheading in order to display it correctly.

However, WikiTree is now trimming off all trailing whitespace characters (blanks, tabs, carriage returns) at the end of the page. This causes the last subheading to not be displayed correctly as a subheading, but instead to be displayed as regular text.

One suggested fix is to:

  • Trim all trailing spaces
  • Trim all trailing carriage return characters, except for the last one.

Doing that will leave the last carriage return character, which would allow the wiki to properly format the subheading.




in WikiTree Tech by Eric Weddington G2G6 Pilot (531k points)
retagged by Ellen Smith
Add a horizontal line below your last entry, Eric; see if that fixes the problem.
Oh, I'm sure that adding a horizontal would be a workaround. But then there would be a horizontal line at the bottom for no real purpose.

I'm not looking for a workaround. My point is that this is a bug in the post-processing of the page upon a page Save, and that it should get fixed.
I took a look at it, and see no obvious problem. The last line looks all the similar headings.

On a bigger issue, formatting is one of the things I find most frustrating about WikiTree. So, I do as little of this as possible.
Again, it is not an obvious problem because the issue is in trimming whitespace characters after saving the page. Of course, the last subheading will look like all the other subheading lines. That's not where the problem is.

I know that the problem is in trimming whitespace characters because I recently edited the page and added a hard return (carriage return) character at the end, saved the page, and it formatted the last subheading correctly.

Then there was a recent change in how pages are saved. The problem showed up again. Again, I put in a hard return (carriage return) and saved the page, and the formatting was not fixed. I open the page, and the carriage return character is no longer there, ergo, it is being trimmed off upon save.

I've been doing software engineering for over 25 years. So I've seen this before. The solution is pretty simple: don't trim all the trailing whitespace characters on a page, and leave the last Carriage Return (CR) character. That will cause the wiki formatting to properly format the subheading on the last line.

Please log in or register to answer this question.

Related questions

+15 votes
4 answers
+8 votes
1 answer
+12 votes
2 answers
+4 votes
7 answers
+9 votes
2 answers
+4 votes
3 answers
+4 votes
1 answer

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

disclaimer - terms - copyright