-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix apparent typos in sample.lua #6729
Conversation
I see it more as an example of how we can write a custom writer, in this case a HTML writer. If it can do all or most of pandoc's internal writer, good, but might not be necessary.
Yes, I can confirm. One could also point out that things like
Agree. My own version begins with |
Thanks for the feedback @kysko. Some follow-ups. I'll leave this for a bit to allow more discussion and then will push some more changes that reflect consensus (unless someone else wants to take this on, which would be fine by me!).
OK. However, I think that migration from using the built-in HTML writer to using a custom HTML writer will be a common use case, so I think it would be really good if the sample lua writer produced similar HTML. Otherwise, everyone will need to go through the same process in realising and fixing the differences. Perhaps I'm really suggesting that, rather than being
My
I subsequently realised that this should be done intelligently (because of the special |
@jgm I note that this is merged and closed. Should I move the open discussion to a separate issue (not sure what the convention is here)? |
Thanks for these improvements.
That seems right.
I think we need to balance two goals: reproducing the HTML writer's behavior, and functioning as a clean and relatively easy to understand example. I'm happy to accept changes to bring the filter's behavior closer to the HTML writer, but I might think twice if they introduce a lot of additional complexity.
Yes.
Probably. The original sample.lua goes pretty far back.
Agreed.
I don't feel strongly about this. I think it's fine. It does add a bit of complexity but people can just copy the spairs function. |
% pandoc --version // pandoc 2.9.2.1 (but not really relevant)
This PR fixes a few obvious (I hope) typos.
Notes on the changes:
There are a few other things that I could fix here (or elsewhere), but I wanted to check first: