Parsoid has a linter extension which is well suited for something like this and was effectively developed with something like this in mind. It is currently enabled on *all* parses, but in the future, depending on how expensives lints become, we may find alternate ways of running this.
As it turns out, Parsoid's extension API exposes a
lintHandler entry point for extensions to run their lints.
So, of course, you can only support this in the context of
Parsoid's parses. The other caveat is that we haven't fully
thought through all the details, but if you are interested, this
would be a good use case to explore this. But, see Cite's
ref-tag's implementation for this. This implementation
effectively calls Parsoid's default handlers on the wikitext
encountered in the <ref> tag, but, extensions which might
deal with their own wikitext might do other processing here
without calling the default handler.
This is my recommended approach rather than mess with change streams, diffs, etc.
Subbu.
Dear all,
we have developed a tool that is (in some cases) capable of checking if formulae in <math/>-tags in the context of a wikitext fragment are likely to be correct or not. We would like to test the tool on the recent changes. From
we can get the stream of recent changes. However, I did not find a way to get the diff (either in HTML or Wikitext) to figure out how the content was changed. The only option I see is to request the revision text manually additionally. This would be a few unnecessary requests since most of the changes do not change <math/>-tags. I assume that others, i.e., ORES
compute the diffs anyhow and wonder if there is an easier way to get the diffs from the recent changes stream without additional requests.
All the bestPhysikerwelt (Moritz Schubotz)
_______________________________________________ Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/