Skip to content

Plug-in round 2 #10

@kristopolous

Description

@kristopolous

I talked about the simplistic plugin system and it seems to work but frankly I think I've just been getting lucky.

block versus line

There's two levels this is what HTML 4.0 back in the day called block and line level elements..

Line level is something like text format such as italics or bold. It can wrap around and be in a say, a table.

Block level elements are things like the formatted code blocks, headline tags, and once again tables.

This older paradigm allows for parsing rendering and layout to be handled with the same abstractions.

Modern engines have moved away from that but markdown I think can still use it.

So that's the first one. Plugins can't just take text streams and emit. It needs to have an opinion on these two

partial stream render

To understand this best, let's pretend we are parsing bold. Here's some possibilities

This is **bold text** isn't _it lovely_

This is **bo
ld text** isn't  _it lovely_

And a true nightmare: 

This is *
*bo
ld text
** isn't  _it lovely_

In each of these, the plug-in only has opinion on the bold and it needs to pass thru essentially this every time

Take back "this is" but I'm interested in what comes after

Either 
  Ok nevermind, I actually don't care about it
  Yes but I don't have all of it so I'm keeping it

Finally 
 Alright here's your output to pass down. Also, here's some junk at the end I didn't do anything with

The current plug-in architecture I don't think can accommodate for this. I thought it could last night but I'm thinking about changing my opinion.

So the task here is really to come up with some tests and figure out how much of this needs to be done

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions