Slide 10
Slide 10 text
md2sht process
The md2sht program is composed of
● the executable, which takes
care of
○ parsing command line
options
○ reading input
○ outputting the results
● the library, which contains
○ a function to parse and
apply transforms to our
HTML
○ a parser for CSS
Parse CSS using AttoParsec to a flat
List of Rules of Selector and List of
Lines (property-value pairs)
Parse HTML using TagSoup to a flat
List of Tags (Open, Closing, Text, etc.)
Extract the styles by matching the
Rules to classes in the HTML and inline
them, removing classes in the process