Closed zepinglee closed 2 years ago
@zepinglee it sounds good, I think. Especially the fact that the module will be returned instead of the object itself.
@zepinglee it sounds good, I think. Especially the fact that the module will be returned instead of the object itself.
Thanks! I've finished most of this work.
I was new to Lua when starting project so I followed https://www.lua.org/pil/16.2.html to design the API:
CiteProc:new()
is used to create a new processor instance andciteproc.lua
returns the class table. However the API looks bad after I read https://github.com/luarocks/lua-style-guide and http://hisham.hm/2014/01/02/how-to-write-lua-modules-in-a-post-module-world/. I decide to refactor the code to follow the LuaRocks style.citeproc.lua
will return a module table.citeproc.new()
will be used to initialize a processor instance.CiteProc:makeBibliography()
andCiteProc:makeCitationCluster()
will be renamed tomake_bibliography
andmake_citation
to meet the naming convention.@michal-h21 do you have any suggestions?