Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ID of the div.highlight pre element gets overwritten #115

Open
So-Cool opened this issue Jan 2, 2021 · 1 comment
Open

ID of the div.highlight pre element gets overwritten #115

So-Cool opened this issue Jan 2, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@So-Cool
Copy link

So-Cool commented Jan 2, 2021

Describe the bug

The extension overwrites the id of the div.highlight pre element with codecell# (if it already has one). The expected behaviour would be to use the id that already exists.

To Reproduce

  1. Create a code block with an id, e.g.:
    <div class="highlight">
        <pre id="my-id">
            code...
        </pre>
    </div>
    
  2. Open the HTML page.
  3. my-id is overwritten with codecell0.

Expected behavior

my-id is preserved and used to facilitate the extension functionality.

Environment

  • Python Version [e.g. 3.7.1]: 3.8.2
  • Package versions or output of jupyter-book --version: 0.3.1
  • Operating System: MacOS 10.15.6

Additional context

Jupyter Book: 0.9.1
MyST-NB: 0.10.1
Sphinx Book Theme: 0.0.39
MyST-Parser: 0.12.10
Jupyter-Cache: 0.4.1
NbClient: 0.5.1
@So-Cool So-Cool added the bug Something isn't working label Jan 2, 2021
@welcome
Copy link

welcome bot commented Jan 2, 2021

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

So-Cool added a commit to simply-logical/simply-logical that referenced this issue Jan 8, 2021
1. Display SWISH query box code syntax highlighting
2. SWISH query box CSS stylesheet correction (_static/lpn.css)
3. Display SWISH query box copy button -- no need to enable the custom class
   by setting the `copybutton_selector` configuration variable to
   `"div.highlight pre, div.extract.swish pre.swish.query"`
   since the code syntax highlighting embeds an extra `div` element
   and the outer element id is no longer overwritten
   (see <executablebooks/sphinx-copybutton#115>)
So-Cool added a commit to simply-logical/simply-logical that referenced this issue Jun 15, 2022
Fixes #2.

* ch1
* Jinja prep
* Decomposition
* Jupyter Book setup and config
* infobox and exercise directives implementation
* functional swish and infobox directives
* roman- and letter-based enumeration fix
* math fixes
* text fixes
* code cleanup + -start & -end examples clean + swish inheritance fix
* typos
* HTML parentheses fix
* HTML codes fix
* section markings (`+++`)
* figure referencing
* parts references
* appendix references
* chapter references
* section references
* list references fix -- a., b., ... and i., ii., ...
* numbering exercise boxes
* allow exercises to be referenced
* cap the code at 80 lines for improved rendered readability
* linking solutions to exercises
* justify fix
* GitHub deployment preparation
* reading exercises from separate markdown files
* exercise separation
* ASCII cleanup
* math typo
* Simply Logical Jupyter Book extension as a git submodule
  See https://github.com/simply-logical/SL-Sphinx for more details
* Hyper-link marker highlight fix
* Fix footnote numbering
  Workaround for MyST Markdown parser issue #195
* SWISH box ids start with "swish:"
* tabulation
* SWISH query boxes (taken from the first release)
* Content cleanup
* Fix named paragraphs
* pProlog syntax highlighting
* Scrollable SWISH boxes if they exceed 450px (#5)
* Edits Chapters 1-3
* Discard Prolog output from multi-line SWISH queries (closes #5)
* Finished polishing Chs.1-3
* Polished Chs.4-6
* Display SWISH query boxes: copy button + syntax highlight
  1. Display SWISH query box code syntax highlighting
  2. SWISH query box CSS stylesheet correction (_static/lpn.css)
  3. Display SWISH query box copy button -- no need to enable the custom class
     by setting the `copybutton_selector` configuration variable to
     `"div.highlight pre, div.extract.swish pre.swish.query"`
     since the code syntax highlighting embeds an extra `div` element
     and the outer element id is no longer overwritten
     (see <executablebooks/sphinx-copybutton#115>)
* SWISH code box Prolog syntax highlighting (closes #9)
* More SWISH boxes Part II
* Polished Ch.7
* Polished Ch.8
* First Ch.9 edits
* Polished code fragments and exercises
* Improved chapter numbering, hidden examples blocks and glossary skeleton
* Feature integration
* Manual part numbering
* git submodule -> PyPI package
* Up-to-date build and install instructions
* Enables Prolog file-based SWISH code blocks (#10)
* Deployment script fix
* Testing file-based SWISH boxes (sections 9.2 and 9.3)
* sphinx-prolog with correct solution referencing
* Build link check + Figure 4.1.1 (4.2) fix
* Fixed some TODOs
* Depth-2 numbering of figures, exercises and solutions
* Install sphinx-multitoc-numbering from PyPI
* Attribution-NonCommercial-NoDerivs CC BY-NC-ND
* Checked answers to exercises.
* Added preface and first version of glossary.
* jupyter-book==0.10.1
* Fix empty lines
* Added unification TO DO entry
* Fixed broken links
* Update build-and-deploy.yml
* Undo change to build-and-deploy.yml
* Final check of text and programs.
* Graphviz rendering
* Deploy too
* Short glossary intro
* transform.pl
* Update b_1.md
* transform.pl
* Update transform.pl
* complete.pl
* Appendix code boxes again
* Update complete.pl
* Update 9.2.md
* RLGG SWISH box
* Update rlgg.pl
* induce_rlgg SWISH box
* Update 9.2.md
* induce_rlgg SWISH box
* Update glossary.md
* induce_spec SWISH box
* Remove obsolete section92.pl
* induce_spec SWISH box
* Update induce_spec-end.pl
* Update 9.3.md
* Typo
* Generate and test
* Typo
* Relational logic example
* Relational logic example
* Propositional logic example
* Whitespaces
* Release v2.0 prep
  Co-authored-by: Peter Flach <Peter.Flach@bristol.ac.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant