Beginning work on the parser
Closed this issue · 1 comments
The next steps are:
Tie the input to the output
On keyup, the text-area should dump its contents to the transdownify function, which should update the html in the live preview.
Start work on getting a parser that can output to the transdown object spec
This will be less easy, so it'll take some thinking. I'm wondering if having default object constructors might be helpful. Perhaps we could turn the current transdown-specification.js
into a file with a namespace. That namespaces properties would be the hierarchy of the transdown object, except they'd be functions that return empty/default instances of the object specs.
Or, I guess, we could just hand the object specs to the constructor method. See Crockford (p.144 and thereabouts) on handling a situation where we pass in a spec
object to specify common properties. Specifically, note how he uses the OR ||
so that if a property isn't defined in the spec, he can define it there. That can be a good pattern for episode titles, perhaps.
var cat = function (spec) {
spec.saying = spec.saying || 'meow';
var that = mammal(spec);”