Changeset 36


Ignore:
Timestamp:
Jun 4, 2014, 1:17:23 PM (7 years ago)
Author:
vadim.godunko
Message:

Add circuit to handle one-line block elements like headers.

Location:
trunk/forge/source/wiki
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/forge/source/wiki/forge-wiki-block_parsers-headers.adb

    r35 r36  
    4848   H1_Tag    : constant League.Strings.Universal_String
    4949     := League.Strings.To_Universal_String ("h1");
     50
     51   ----------------------
     52   -- Can_Be_Continued --
     53   ----------------------
     54
     55   overriding function Can_Be_Continued
     56    (Self : not null access constant Header_Block_Parser) return Boolean is
     57   begin
     58      return False;
     59   end Can_Be_Continued;
    5060
    5161   ------------
  • trunk/forge/source/wiki/forge-wiki-block_parsers-headers.ads

    r35 r36  
    6464       return Header_Block_Parser;
    6565
     66   overriding function Can_Be_Continued
     67    (Self : not null access constant Header_Block_Parser) return Boolean;
     68   --  Returns False always. Header block element can occupy one line only.
     69
    6670   procedure Register;
    6771   --  Registers block parser to handle headers.
  • trunk/forge/source/wiki/forge-wiki-block_parsers.ads

    r32 r36  
    8787   --  Dispatching constructor to create instance of block element parser.
    8888
     89   not overriding function Can_Be_Continued
     90    (Self : not null access constant Abstract_Block_Parser) return Boolean;
     91   --  Returns True when block element can be continued on next line. Default
     92   --  implementation returns True always.
     93
    8994end Forge.Wiki.Block_Parsers;
  • trunk/forge/source/wiki/forge-wiki-parsers.adb

    r30 r36  
    269269               Self.Block_State.Line (Lines (Line).Tail_From (Text_Offset));
    270270
     271               --  Detect whether block element occupy only one line.
     272
     273               Self.Is_Separated := not Self.Block_State.Can_Be_Continued;
     274
    271275               Found := True;
    272276
Note: See TracChangeset for help on using the changeset viewer.