TEIC / CETEIcean

TEI in HTML5 Custom Elements
BSD 2-Clause "Simplified" License
164 stars 36 forks source link

Strange behaviour when attribute is missing #33

Closed lb42 closed 3 years ago

lb42 commented 4 years ago

I have a defined behaviour like this : "pb":[ "<p class='break'>[page $@n]</p>"], This make e.g. <pb n="42"/> look like [page 42] which is fine. However, if the n attribute is missing, it produces [page $@n] which seems a bit strange. Why doesn't it just do [page ] ?

hcayless commented 4 years ago

That's a bug. I just pushed a fix for it.

lb42 commented 4 years ago

Thanks for speedy fix. I needed to rebuild (as per #30) -- is it intentional that the "dist" folder is not included in the git repo?

hcayless commented 4 years ago

Yeah, because it could get out of sync with the source. Probably it's just me being careful, but I like to keep the distinction: source code in the repo / build artifacts with the releases. Probably we should have our CI generate a bleeding edge version though...

raffazizzi commented 4 years ago

Yes, I think not including the dist folder is generally considered best practice. The npm module should include it, however, because it gets built before publishing.