Need to be able to have placeholders introduced into output stream to automatically add empty-links.
At present when using showdown you specify a link by putting the text you want to be a link into brackets: .
Now when you do this all the text is still surrounded by the brackets. You then have to go the bottom of your text page and add the actual link information (meta-link information). Here is an example:
some text below the brackets placeholder
See this is what I’m talking about; circularity at its worst while trying to put this post together I’m using showdown, but I have to go to the bottom of the page to put the meta-link information. Something like a chicken-egg problem. At least I’m dog-fooding code that I’m using in this web app
Note: The showdown tokens for placeholders
link = [link-text]
image = [image-holder][alt-text]
This spec is not complete!
There are five objects. The main architecture will use Atomic Object‘s Presenter First Pattern.
User will enter a character at a time which will get sent to the text model
Just forwards the character to the text model
The text model will pass character to placeholder recognizer. If a place holder it will the generate the meta-link information for the placeholder and store it in the text. The revised text is then sent to showdown. the showdown information is then sent to the HTML presenter
Forwards data to the output.