User:EMBee/Scrap: Difference between revisions

m
→‎Text to HTML: made to task
(potential algorithm for a text to html conversion)
m (→‎Text to HTML: made to task)
 
(3 intermediate revisions by the same user not shown)
Line 2:
* suggest task for binary math.
* draft task for math with boolean lists like in early lisp as per http://paste.lisp.org/display/126287
 
==Text to HTML==
Convert plain text to HTML.
The plain text has no formatting information.
It may have centered headlines, numbered sections, paragraphs, lists, and URIs. It could even have tables.
 
potential algorithm:
* split by line
* find average line length to identify centered lines
* find isolated lines to identify section headings
* find URIs
* identify section numbering
* identify bullet and numbered lists
* identify paragraphs
* identify indented lines
* if possible identify tables
 
to ensure valid html/xhtml create a nested structure:
* create an xml node
* add elements to node
* add lines to element if multiline like paragraph
Anonymous user