michal-h21 / LuaXML

Fork of LuaXML (originally Paul Chakravarti)
14 stars 9 forks source link

Pb with unicode library when luaxml used standalone #1

Closed aldus2 closed 4 years ago

aldus2 commented 5 years ago

I used luaxml with lua standalone (away from luatex for test purpose) . I had an error because my lua didn't know the unicode library (part of luatex it seems). I went around the problem by using the utf8 library that now comes with version 5.3 in line 2 of luaxml-entities.lua. I would suggest to substitute the initial line 2 local char = unicode.utf8.char with local char = unicode and unicode.utf8.char or utf8.char. Thus, if the unicode library is absent, you get the utf8 one as a replacement. So far, it didn't create problems but I just began using luaxml.

michal-h21 commented 5 years ago

Thanks for the suggestion, it seems to work. It is good to know that LuaXML works with standalone Lua, I had to change the file naming to work with CTAN, so it doesn't really follow normal Lua module conventions.

aldus2 commented 5 years ago

Nice to have Typo text Pb with css style -> where is best ?

Laurent DUBIEF (mobile)

Le 2 nov. 2018 à 15:10, Michal Hoftich notifications@github.com a écrit :

Thanks for the suggestion, it seems to work. It is good to know that LuaXML works with standalone Lua, I had to change the file naming to work with CTAN, so it doesn't really follow normal Lua module conventions.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

aldus2 commented 5 years ago

Hi !

Sorry for my previous rather cryptic message !

First of all, I am glad that you bring a nice working solution to serialize and unserialize between lua and XML, and something documented, based on standards.

I’ve been working on the documentation to be able to use luaxml. When I encounter typographical bugs, how should I report them (if this is of any help) ?

I have a problem with the query_selector ( “explose” method missing), where should I report that : on github I guess ?

Thanks again,

Aldus (mobile)

Le 2 nov. 2018 à 15:10, Michal Hoftich notifications@github.com<mailto:notifications@github.com> a écrit :

Thanks for the suggestion, it seems to work. It is good to know that LuaXML works with standalone Lua, I had to change the file naming to work with CTAN, so it doesn't really follow normal Lua module conventions.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/michal-h21/LuaXML/issues/1#issuecomment-435392042, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Adi0Mcx6hq8huZViwCy1wDKa7IaQBIxuks5urFJHgaJpZM4YLps2.

michal-h21 commented 5 years ago

Thank you for your kind words. Yes, you can report all bugs here on Github. I've added some definition for string.explode, all tests now works with Lua 5.3.