23 lines
609 B
V
23 lines
609 B
V
module markdownparser2
|
|
|
|
// Parse inline elements within a block
|
|
fn (mut p Parser) parse_inline(text string) []&MarkdownElement {
|
|
mut elements := []&MarkdownElement{}
|
|
|
|
// Simple implementation for now - just create a text element
|
|
if text.trim_space() != '' {
|
|
elements << &MarkdownElement{
|
|
typ: .text
|
|
content: text
|
|
line_number: 0
|
|
column: 0
|
|
}
|
|
}
|
|
|
|
// TODO: Implement parsing of inline elements like bold, italic, links, etc.
|
|
// This would involve scanning the text for markers like *, _, **, __, [, !, etc.
|
|
// and creating appropriate elements for each.
|
|
|
|
return elements
|
|
}
|