From 91d7adcbf1274971e16f53f94aa6915b70cb71b7 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 27 May 2008 00:01:27 -0500 Subject: [PATCH] Comparison component --- extra/html/components/components.factor | 9 ++++++++- extra/html/templates/chloe/chloe.factor | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/extra/html/components/components.factor b/extra/html/components/components.factor index 382636d952..efac730af6 100644 --- a/extra/html/components/components.factor +++ b/extra/html/components/components.factor @@ -4,7 +4,8 @@ USING: accessors kernel namespaces io math.parser assocs classes classes.tuple words arrays sequences sequences.lib splitting mirrors hashtables combinators continuations math strings fry locals calendar calendar.format xml.entities validators -html.elements html.streams xmode.code2html farkup inspector ; +html.elements html.streams xmode.code2html farkup inspector +lcs.diff2html ; IN: html.components SYMBOL: values @@ -211,6 +212,12 @@ SINGLETON: inspector M: inspector render* 2drop [ describe ] with-html-stream ; +! Diff component +SINGLETON: comparison + +M: comparison render* + 2drop htmlize-diff ; + ! HTML component SINGLETON: html diff --git a/extra/html/templates/chloe/chloe.factor b/extra/html/templates/chloe/chloe.factor index 6790a9f666..092f79bb36 100644 --- a/extra/html/templates/chloe/chloe.factor +++ b/extra/html/templates/chloe/chloe.factor @@ -272,6 +272,7 @@ STRING: button-tag-markup { "code" [ code tuple-component-tag ] } { "farkup" [ farkup singleton-component-tag ] } { "inspector" [ inspector singleton-component-tag ] } + { "comparison" [ comparison singleton-component-tag ] } { "html" [ html singleton-component-tag ] } ! Forms