Trailing Spaces in Title Header on Folders Only

User avatar
RonJeffries
Posts: 290
Joined: Sat Dec 08, 2012 6:19 pm
Platform: Mac

Thu Jun 21, 2018 2:29 am Post

I have folders and documents at level 1 all set to the same format. It has # Section Title # set up.

Documents compile with the title enclosed in "# " and " #".

But folders are compiled with two trailing spaces. "# " and " # ". ("b#bb")
There's only one format, they're both set to it.

Ideas on what's possibly happening, please? Is there a mystery setting somewhere?

User avatar
KB
Site Admin
Posts: 20716
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Thu Jun 21, 2018 11:46 am Post

Sorry, I'm not really sure what you mean by this:

"But folders are compiled with two trailing spaces. "# " and " # ". ("b#bb")"

What does the "b" represent, and what do you mean with the hashes there?

It might be easiest to post a smalls sample project showing the issue.

All the best,
Keith
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

User avatar
RonJeffries
Posts: 290
Joined: Sat Dec 08, 2012 6:19 pm
Platform: Mac

Thu Jun 21, 2018 1:13 pm Post

I'm compiling to MMD. Titles are supposed to be enclosed in # Title #.

Documents do compile that way. Folders compile that way with two trailing spaces.

Representing the spaces with b, this is the output one gets:

Code: Select all

#bDocumentbTitleb#
#bFolderbTitleb#bb


I'll see if I can strip down my project and attach it later, but I hope this is more clear. Meanwhile I changed my splitter script to trim off blanks before trimming off the hash marks.

Thanks for your prompt attention. It is quite unusual and quite appreciated.

User avatar
KB
Site Admin
Posts: 20716
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Thu Jun 21, 2018 1:33 pm Post

A sample project would definitely help, as I can't think of what would cause this off-hand, so it is presumably down to some particular setting in the project.
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

User avatar
RonJeffries
Posts: 290
Joined: Sat Dec 08, 2012 6:19 pm
Platform: Mac

Thu Jun 21, 2018 2:05 pm Post

Can I just copy the .scriv file of my real thing and pare it down? Does that work to duplicate a thing?

User avatar
AmberV
Posts: 23616
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Thu Jun 21, 2018 2:10 pm Post

You might even be able to relay the problem with the Format all by itself. Try right-clicking on it in the compile overview screen and selecting the “Export Format…” option.

But yes, otherwise using File ▸ Save As... to create a temporary copy and stripping all content out but what is needed to reproduce it should work fine.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

User avatar
RonJeffries
Posts: 290
Joined: Sat Dec 08, 2012 6:19 pm
Platform: Mac

Thu Jun 21, 2018 3:38 pm Post

Tried to export the scrformat and load it here. It shows up as greyed out in Finder. Is it special? Can't seem to attach it.

User avatar
AmberV
Posts: 23616
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Thu Jun 21, 2018 3:43 pm Post

It’s just an XML file. Try zipping it, maybe your browser has a whitelist extension filter for uploads.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

User avatar
RonJeffries
Posts: 290
Joined: Sat Dec 08, 2012 6:19 pm
Platform: Mac

Thu Jun 21, 2018 5:13 pm Post

trying from home with drag:

Says "invalid file extension scrformat".

Zipping ... that seems to work. I'll work on a sample project now as well.

Thanks,

R
Attachments
RJ-GitHub.scrformat.zip
(3.72 KiB) Downloaded 17 times

User avatar
RonJeffries
Posts: 290
Joined: Sat Dec 08, 2012 6:19 pm
Platform: Mac

Thu Jun 21, 2018 5:26 pm Post

And here is a project bug-titles. Note in the compiled output that the title for the folder, Testing the compile, has two spaces following the terminating pound sign / hash mark / octothorp.

Thanks!
Attachments
bug-titles.scriv.zip
(343.63 KiB) Downloaded 18 times

User avatar
KB
Site Admin
Posts: 20716
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Thu Jun 21, 2018 5:42 pm Post

Okay, the reason and fix is quite simple:

1. Your "Use SubSection" separators are set to "Single return" for both "before" and "between". When this is selected for MultiMarkdown, two spaces are inserted at the end of the previous line, and then a return is inserted. This is the correct way to force a single line break in MultiMarkdown.

2. You are then forcing the extra line between sections for "Use SubSection" by inserting a return character into "Section prefix". That's not really for adding separators.

So, the fix:

1. In "Separators", select the "Use SubSection" layout and change both "Separator before sections" and "Separator between sections" to "Empty line".

2. In "Section Layouts", select the "Use SubSection" layout, select "Prefix" from the tabs in the middle, and remove the return character you have entered into the "Section Prefix" area.

That resolves the issue.

All the best,
Keith
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

User avatar
RonJeffries
Posts: 290
Joined: Sat Dec 08, 2012 6:19 pm
Platform: Mac

Thu Jun 21, 2018 9:33 pm Post

Dayum! My pal and I actually remarked about the space-space line break thing this morning but didn't see how it could be implicated.

Thanks!