Closed ForbesLindesay closed 9 years ago
Tests are required to make sure this is really having the desired effect and doesn't break again in the future.
I'm going to struggle to write tests without being able to clone it locally (I don't have a unix computer to hand). The regex replacements are pretty robust. The first strips all html tags from the text, because you don't actually want to display the headings as anything other than plain text in the table of contents.
The second and third replacements are added to escape the HTML. My guess is that these are not actually wanted though, so I'll remove them. I imagine you do the escaping when you render the table of contents anyway.
Trim had to be added because sometimes the markdown parser will introduce a new-line.
@ForbesLindesay I'm puzzled. A have a file or directory with a comma in it? That's weird. I haven't noticed. Can you point me to it? Maybe try downloading the repo as a zip archive and extracting it?
You can still write tests and whenever you push to Github, Travis will run them. I realize this is less than ideal, but it does work. Since the feature is rather simple, it could be done.
In this folder there are lots of folders with colons (:
) in them.
according to this, the windows issue has been resolved, but will require an update to the node-replay
module
Yes, you would also need to rename all the folders with :
in them by replacing :
with -
Here we go. Sorry for the HUGE delay in getting this done...
Can you now make sure these tests pass with your changes? Add some tests if necessary.
I think this just works now. There has been a complete rewrite.
At the moment they just display the markdown as plain text in the table of contents:
http://documentup.com/substack/stream-handbook