Changeset 39


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

Handle text of paragraph correctly.

Location:
trunk/forge/source/wiki
Files:
2 edited

Legend:

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

    r37 r39  
    5858   begin
    5959      return Paragraph_Block_Parser'
    60               (Offset => Parameters.Text_Offset, Writer => Parameters.Writer);
     60              (Offset       => Parameters.Text_Offset,
     61               Writer       => Parameters.Writer,
     62               Space_Needed => False);
    6163   end Create;
    6264
     
    8688     Text : League.Strings.Universal_String) is
    8789   begin
     90      if Self.Space_Needed then
     91         Self.Writer.Characters (' ');
     92
     93      else
     94         Self.Space_Needed := True;
     95      end if;
     96
    8897      Self.Writer.Characters (Text);
    8998   end Line;
  • trunk/forge/source/wiki/forge-wiki-block_parsers-paragraphs.ads

    r32 r39  
    4747
    4848   type Paragraph_Block_Parser is
    49      new Forge.Wiki.Block_Parsers.Nestables.Nestable_Block_Parser
    50        with null record;
     49     new Forge.Wiki.Block_Parsers.Nestables.Nestable_Block_Parser with record
     50      Space_Needed : Boolean;
     51      --  Whether to output or to suppress space character before emitting text
     52      --  of line.
     53   end record;
    5154
    5255   overriding function Start_Block
Note: See TracChangeset for help on using the changeset viewer.