MATLAB Answers

Formatting text description for FEX submission

2 views (last 30 days)
DGM on 19 Jun 2018
Commented: DGM on 7 Jul 2018
I don't recall anyone else mentioning this, but it seems to be a recurring problem for me. I update my FEX submissions as they develop, and I like to keep the descriptions relatively organized and well-detailed.
The problem is that the editor does not appear to support any sort of markup for formatting (bbcode, etc), and it tends to strip leading whitespace from the post. Tabs are impossible, and empty lines between paragraphs don't really work either. It doesn't do it every time, but I'll often post an update to find half of the paragraphs have been run together and there's no way to edit it without making another update.
Is there a workaround for this, or at least something better than using non-whitespace characters as padding?
EDIT: I have found that padding empty lines with spaces seems to help keep them from getting stripped, and almost any space character other than U0020 won't get stripped, but I guess I'm still hoping that there would be a workaround that didn't call for a bunch of unicode wrangling just to keep things from imploding.
The Answers section of the site does support markup in these posts, but I guess that's not a thing on the FEX.


Sign in to comment.

Answers (1)

Stephen Cobeldick
Stephen Cobeldick on 7 Jul 2018
Edited: Stephen Cobeldick on 7 Jul 2018
"... empty lines between paragraphs don't really work either. It doesn't do it every time..."
I noticed this as well. I did some experimenting with my FEX submissions and found that:
  • the first paragraph must be followed by two empty lines.
  • the number of these empty lines decrements by one when it is submitted...
  • so each time you want submit, you have to ensure that these two empty lines are there.
For the rest of the text, all other paragraphs can be separated by one empty line, as long as there are two empty lines after the first paragraph. Otherwise all empty lines get ignore somehow.
Unfortunately markup is not supported.

  1 Comment

DGM on 7 Jul 2018
Yes, I made a dummy submission and tested some things. The behavior I noticed is as follows:
  • Any number of empty lines preceding the first non-empty line are stripped.
  • The first empty line after a nonempty line is stripped.
So I decided to not bother with double-padding if it's still volatile. I just pad each empty line with a space character (other than U0020).
Given the 5000 character limit and the desire to use mid-line tabs or to indent for clarity, i just use U2003 for paragraph and other padding needs. It's persistent and it's wide, so fewer characters are needed. You still can't really align anything since it's a variable-width font, but it's as close as you can get to making a list or table.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!