xeoncross / jr

Jr. the static, static javascript site generator (you should see this)
Other
758 stars 39 forks source link

Ability to surround MarkDown with <pre></pre> #6

Closed adamierymenko closed 10 years ago

adamierymenko commented 10 years ago

If you were allowed to surround the MarkDown with outer

 tags, then this would degrade gracefully into human-readable MarkDown in the absence of JavaScript. The script should ignore 
 tags if they contain the entire page. It should also allow HTML headers and a body tag.

xeoncross commented 10 years ago

Hmm, this may be treason. I wonder if we could get this same thing with a single, unclosed <pre> tag so there was less setup that had to be done on each page. I really want to stick with just plain markdown without a lot of "configuration".

arnognulf commented 10 years ago

To keep it kosher, one could add an unclosed

 tag after a markdown comment (this works in lynx at least). Eg:

[activate javascript to render the markdown syntax]:<pre>

As found at: http://stackoverflow.com/questions/4823468/store-comments-in-markdown-syntax

adamierymenko commented 10 years ago

Hmm... that's possible. The problem that inspired the original bug post is that in HTML newlines are just white space. So if there's no JS you just get an undelimited wall of text. It'd be better if it degraded gracefully, or if this was an option at least.

I like arnognulf's idea. Closing.