[LyX/master] Merge branch 'features/indexmacros'

Scott Kostyshak skostysh at lyx.org
Sun Nov 20 20:23:58 UTC 2022


On Sun, Nov 20, 2022 at 08:24:41PM +0100, Thibaut Cuvelier wrote:
> On Sun, 20 Nov 2022 at 16:47, Scott Kostyshak <skostysh at lyx.org> wrote:
> 
> > On Sun, Nov 20, 2022 at 04:33:36PM +0100, Thibaut Cuvelier wrote:
> > > > When I open the exported de Math.xhtml in Chromium, I get:
> > > >
> > > >   "error on line 7159 at column 22: Entity 'imaginary' not defined"
> > > >
> > >
> > > That's unrelated to this branch, it was a problem in the MathML
> > > configuration.
> >
> > Ah, I was wondering why xmllint didn't catch it but I guess it doesn't
> > catch MathML issues. Probably there is a way to catch them in the
> > ctests, but I don't know if we want to make our ctests more strict. If
> > we make them more strict, I will bug you more about test failures :)
> >
> 
> xmllint is probably not the best tool for (X)HTML, it just validates XML
> syntax (HTML is not necessarily XML, but what LyX generates is; there are
> many constraints that xmllint doesn't know about).
> 
> There are many tools to validate HTML as command-line utilities, but most
> of them are in JavaScript; maybe http://www.html-tidy.org/ could be
> included as a test dependency? It should be more or less easy to integrate,
> as it's just C buildable with CMake and no dependency.

I would be happy to help incorporate that if Kornel does not object (he
knows the most about the ctest framework).

Let's first figure out whether we want the checks in the ctests though.
I think a good rule of thumb is: if a test starts to fail (i.e., suppose
the test with this stricter check used to pass, but some commit that
affects XML output causes the test to fail), will you give priority to
either quickly fixing things so that the test passes, or reverting the
commits that caused the tests to fail? If yes, then they are a good
candidate to be included in the ctests.

If not, probably it is better for you to use the tool locally on your
side. I can help figure out a script for this as well. For example, it
could just loop through all the .lyx files in the repository, export
with xhtml, and check which files pass the stricter test. It would be
easy to set up an ignore list, etc. Or we could put the script in
https://gitlab.com/scottkosty/lyx-tester which has various scripts for
testing.

Let me know what sounds best.

Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20221120/2498fa16/attachment.asc>


More information about the lyx-devel mailing list