-
-
Save gene9/934315 to your computer and use it in GitHub Desktop.
Revisions
-
vlm renamed this gist
Apr 19, 2011 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,4 +13,6 @@ %% strip_html(HTML) -> string(). %% %% which strips the HTML formatting and just returns %% the raw text contents of the given HTML tree. example_data() -> {a, [{href, "http://fprog.ru/"}], [{b, [], ["An example text"]}]}. -
vlm created this gist
Apr 19, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ %% Given the parsed HTML tree in the following format: %% %% Types HTML = [Element] %% Element = {Tag, [Attribute], [Element | Text]} %% Tag = atom() % e.g. 'a', 'pre', 'p' %% Attribute = {Name, Value} %% Name = atom() %% Value = string() %% Text = iolist() %% %% Write the function with the following signature: %% %% strip_html(HTML) -> string(). %% %% which strips the HTML formatting and just returns %% the raw text contents of the given HTML tree.