Remove Farkup caching from Wiki now that Farkup parser is fast
parent
cac26d7b44
commit
e697fe8a90
|
@ -5,7 +5,7 @@
|
|||
<t:title><t:label t:name="title" /></t:title>
|
||||
|
||||
<div class="description">
|
||||
<t:farkup t:name="parsed" t:parsed="true" />
|
||||
<t:farkup t:name="content" />
|
||||
</div>
|
||||
|
||||
<p>
|
||||
|
|
|
@ -47,7 +47,7 @@ article "ARTICLES" {
|
|||
|
||||
: <article> ( title -- article ) article new swap >>title ;
|
||||
|
||||
TUPLE: revision id title author date content parsed description ;
|
||||
TUPLE: revision id title author date content description ;
|
||||
|
||||
revision "REVISIONS" {
|
||||
{ "id" "ID" INTEGER +db-assigned-id+ }
|
||||
|
@ -55,7 +55,6 @@ revision "REVISIONS" {
|
|||
{ "author" "AUTHOR" { VARCHAR 256 } +not-null+ } ! uid
|
||||
{ "date" "DATE" TIMESTAMP +not-null+ }
|
||||
{ "content" "CONTENT" TEXT +not-null+ }
|
||||
{ "parsed" "PARSED" FACTOR-BLOB +not-null+ } ! Farkup AST
|
||||
{ "description" "DESCRIPTION" TEXT }
|
||||
} define-persistent
|
||||
|
||||
|
@ -72,9 +71,6 @@ M: revision feed-entry-url id>> revision-url ;
|
|||
: <revision> ( id -- revision )
|
||||
revision new swap >>id ;
|
||||
|
||||
: compute-html ( revision -- )
|
||||
dup content>> parse-farkup >>parsed drop ;
|
||||
|
||||
: validate-title ( -- )
|
||||
{ { "title" [ v-one-line ] } } validate-params ;
|
||||
|
||||
|
@ -141,13 +137,12 @@ M: revision feed-entry-url id>> revision-url ;
|
|||
[ title>> ] [ id>> ] bi article boa insert-tuple ;
|
||||
|
||||
: add-revision ( revision -- )
|
||||
[ compute-html ]
|
||||
[ insert-tuple ]
|
||||
[
|
||||
dup title>> <article> select-tuple
|
||||
[ amend-article ] [ add-article ] if*
|
||||
]
|
||||
tri ;
|
||||
bi ;
|
||||
|
||||
: <edit-article-action> ( -- action )
|
||||
<page-action>
|
||||
|
|
Loading…
Reference in New Issue