1:- module(bc_comment_format, [
2 bc_format_comment/2 % -QuestionId, -Question
3]).
7:- use_module(library(http/html_write)). 8:- use_module(library(md/md_span)). 9 10:- use_module(bc_walk).
18bc_format_comment(Message, Formatted):- 19 md_span_string(Message, Blocks), 20 bc_walk(add_nofollow, Blocks, Processed), 21 phrase(html(Processed), Tokens), 22 with_output_to(string(Formatted), print_html(Tokens)). 23 24% Adds nofollow to links. 25 26add_nofollow(a(Attrs, Content), a([rel=nofollow|Attrs], Content))
Handles comment formatting */