PatrickMassot / leanblueprint

plasTeX plugin to build formalization blueprints.
Apache License 2.0
136 stars 23 forks source link

Use tag selector in case title has a space in #1

Open alexjbest opened 2 years ago

alexjbest commented 2 years ago

In https://github.com/PatrickMassot/leanblueprint/blob/master/leanblueprint/templates/dep_graph.html#L137 the code

           $('#'+title.replace(':', '\\:')+'_modal').show().children().show().children().show();

is used to select elements with a given id, this id is generated from the labels in the tex source, and this fails to select the element if this label contains spaces. We hit this issue in leanprover-community/flt-regular as the blueprint was converted from some pre-existing notes where the labels did have spaces in. Following https://stackoverflow.com/questions/596314/jquery-ids-with-spaces we change the selector to allow spaces in the id.

I haven't been able to test this change yet.