Commits

anatoly techtonik committed 9a18ca8

Add specification for the wikification engine

Comments (0)

Files changed (1)

+"""
+wikify - micro-framework for text wikification
+
+goals - easy to extend and debug
+
+operation (flat algorithm)
+ for each region
+   - find region in processed text
+   - process region matched
+   - exclude processed text from further processing
+
+example - replace all wiki:something with HTML links
+ [ ] wrap text into list with single item
+ [ ] split text into three parts using regexp `wiki:\w+`
+ [ ] copy 1st part (not-matched) into the resulting list
+ [ ] replace matched part with link, insert (processed)
+     into the resulting list
+ [ ] process (the-rest) until text list doesn't change
+
+ [ ] repeat the above for the rest of rules, skipping
+     (processed) parts
+
+ [ ] reassemble text from the list
+
+
+notes - (flat algorithm) doesn't process nested markup,
+        for example *`bold preformatted text`*
+"""
+
+__author__ = "anatoly techtonik <techtonik@gmail.com>"
+__license__ = "MIT | Public Domain"
+__version__ = "0.1"
+