Files
markdown/source/parser/markdown-blocks-paragraphs.ads
Maxim Reznik 5090cae75d Rename Annotation to Inline
and Annotated_Text to Inline_Vector.
2025-06-03 18:45:04 +03:00

40 lines
1.0 KiB
Ada

--
-- Copyright (C) 2021-2023, AdaCore
--
-- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
--
-- Markdown paragraph block elements
with Markdown.Inlines;
private with Markdown.Implementation.Paragraphs;
package Markdown.Blocks.Paragraphs is
pragma Preelaborate;
type Paragraph is tagged private;
-- Paragraph block contains annotated inline content
function Text (Self : Paragraph) return Markdown.Inlines.Inline_Vector;
-- Return nested annotated text
function To_Block (Self : Paragraph) return Markdown.Blocks.Block;
-- Convert to Block type
function From_Block (Self : Markdown.Blocks.Block) return Paragraph;
-- Convert the Block to Paragraph
private
type Paragraph_Access is access all
Markdown.Implementation.Paragraphs.Paragraph;
type Paragraph is new Ada.Finalization.Controlled with record
Data : Paragraph_Access;
end record;
overriding procedure Adjust (Self : in out Paragraph);
overriding procedure Finalize (Self : in out Paragraph);
end Markdown.Blocks.Paragraphs;