Skip to content

Commit

Permalink
Prepare the image markup to add a simpler variant.
Browse files Browse the repository at this point in the history
FossilOrigin-Name: 1965427c826003d4815594f1f3f8ddbe1dc2a23e6dc0c54a83928ddb486e47be
  • Loading branch information
programandala-net committed Nov 16, 2020
1 parent be9b82a commit 9c00fbd
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 10 deletions.
2 changes: 1 addition & 1 deletion VERSION.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
\ This file is part of Fendo
\ (http://programandala.net/en.program.fendo.html).

: fendo_version ( -- ca len ) s" 0.6.0-pre.70+20201116" ;
: fendo_version ( -- ca len ) s" 0.6.0-pre.71+20201116" ;

\ vim: filetype=gforth
39 changes: 30 additions & 9 deletions fendo.markup.fendo.image.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

\ This file defines the Fendo markup for images.

\ Last modified 202011160218.
\ Last modified 202011160255.
\ See change log at the end of the file.

\ Copyright (C) 2013,2014,2017,2018,2020 Marcos Cruz (programandala.net)
Expand Down Expand Up @@ -34,7 +34,7 @@ fendo_definitions
require fendo.image.fs

\ ==============================================================
\ Tools to parse the image markup {{{1
\ Complex images markup code {{{1

: get_image_src_attribute ( "name" -- )
files_subdir $@ parse-name s+ src=! ;
Expand Down Expand Up @@ -85,12 +85,7 @@ variable image_finished? \ flag, no more image markup to parse?
: ({{) ( "imagemarkup}}" -- )
parse_image [<img>] ;

\ ==============================================================
\ Markup {{{1

markup_definitions

: {{ ( "imagemarkup}}" -- )
: (complex_{{) ( "imagemarkup}}" -- )
({{) ;

\ doc{
Expand All @@ -116,7 +111,7 @@ markup_definitions
\
\ }doc

: }} ( -- )
: (complex_}}) ( -- )
true abort" `}}` without `{{`" ;

\ doc{
Expand All @@ -127,6 +122,29 @@ markup_definitions
\
\ }doc

\ ==============================================================
\ Simple images markup code {{{1

\ XXX TODO

\ ==============================================================
\ Markup {{{1

markup_definitions

defer {{

defer }}

' (complex_{{) is {{
' (complex_}}) is }}

\ ==============================================================
\ Markup selectors {{{1

\ XXX TODO

fendo_definitions
.( fendo.markup.fendo.image.fs compiled ) cr

\ ==============================================================
Expand All @@ -147,5 +165,8 @@ markup_definitions
\ 2020-11-14: Remove old unused code from `parse_image`. Add `img`.
\ Factor `set_image_size_attributes`. Move the general code to a new
\ file <fendo.image.fs>, keep here the markup-specific code.
\
\ 2020-11-16: Make `{{` and `}}` deferred in order to prepare an
\ alternative simpler version.

\ vim: filetype=gforth

0 comments on commit 9c00fbd

Please sign in to comment.