{ "date" : 200812112059,
"updated" : 200906171906,
"title" : "~ReMarkable!~",
"tags" : ["web-dev", "code-is-art"],
"enclosure" : "ReMarkable.zip"
}
~ReMarkable~ is my own ~ ``|paragraph} tags to {````
:: v0.3.1—20th April ’09
• Superscript was failing on `“10^th”` as the unicode quotes confusing the {regex}
• Hyperlinks / images now support “`//`” shorthand for “`http://`”¬
(see
Item 1
Item 1
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
`` blocks are intelligently unindented so that your code samples don’t break trying to fit ~ReMarkable~ output into your site design. Remarkable Code (#remarkable-code) ============================================================================================================================= Whilst not on exact feature parity with ~PHPMarkdown~, ~ReMarkable~ achieves its design with very compact code. ~PHPMarkdown~ is spread across 120 functions composing two classes.¬ ~ReMarkable~ is nearly 400 lines long in just one function. Lists, definition lists and blockquotes are recursively converted (including all the conversion cases mentioned above) in two lines of code. Needless to say, the regex kills a kitten each time you run ~ReMarkable~. <~ReMarkable~’s code (/code/remarkable/remarkable.php)> has been a real labour of love. I have tried to make sure it is well commented, but the tricks being used to reduce the amount of looping, and to achieve all that it does within one function can be difficult to understand. A future «» article will do a more detailed breakdown of the {PHP} used. What’s Next? (#remarkable-next) ============================================================================================================================= The goal with ~ReMarkable~ was to be able to publish my entire site’s contents. That has been achieved. Now ~ReMarkable~ is in your hands. I’m sure you’ll find a million bugs I never noticed. I don’t write articles the same way you do. Send bugs and suggestions to . What’s Planned (#remarkable-planned) ----------------------------------------------------------------------------------------------------------------------------- There are a number of shortcomings of ~ReMarkable~ that I’m aware of and will be tackling at various stages of the future (as Camen Design’s needs demand, really). Any suggestions for features, is always welcome. * * * Priorities (#remarkable-priorities) ----------------------------------------------------------------------------------------------------------------------------- That said however, ~ReMarkable~ was not designed to ever be all things to all people. In accepting suggestions and fixes into my version of the code, these are ~ReMarkable~’s priorities: :: {HTML5}, {UTF-8}. No classes If you need every {HTML} tag to have a class or {ID} you need to learn .¬ ~ReMarkable~ doesn’t output any {HTML5} specific tags, so it’s safe to use in {HTML4} :: Sloppy writing is not a fringe case ~ReMarkable~ will never allow escaping of characters. That’s a cop out to avoid properly designing the syntax.¬ Any weird text you’re writing that’s firing off ~ReMarkable~ syntax is more than likely a computer term or technical quote and should be wrapped in ```code``` spans. For example: «`I copied the ~luser folder to ~root`» would be recognised as a citation between the two tildes. Regardless of any literal readability, these folder names (including the tilde) are not part of the English language. Use «``I copied the `~luser` folder to `~root```» instead. If the bug can be solved by following the syntax documentation correctly, or by changing two or three letters in your source, then it’s not a bug. :: Code is Art If I can’t maintain elegance and beauty in the code then it can’t be worth it. Enjoy.