day50-dev / day50-dev/streamdown
Plug-in round 2
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 360
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the current plug-in architecture and its existing tests, if any. Add tests covering block versus line elements and plug-ins receiving partial bold-markup streams. Done means the tests clearly establish what the current architecture supports and expose which behavior needs redesign.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, content
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100