Juan-Carlos Gandhi (
juan_gandhi) wrote2014-12-05 05:00 pm
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Entry tags:
- code sample,
- html,
- scala,
- xml
а вот и весь мой рендеринг
def questionHTML(i: Int, q: String) = <span> <h3>Question {i+1}</h3>{q} <br/><br/><br/><br/><br/><br/> </span> def variantHTML(v: List[String]) = <p style="page-break-after:always;"> <h1><center>{title}</center></h1> {v.zipWithIndex map {case(q,j) => questionHTML(j,q)}} </p> def html(variants: List[List[String]]) = { <html><body>{ variants map variantHTML }</body></html> }
no subject
no subject
no subject