BCcampus / pressbooks-openstax-import

[UNMAINTAINED] Pressbooks Plugin for OpenStax Textbook Import
GNU General Public License v3.0
5 stars 0 forks source link

OpenStax glossary terms bold in CNX, not in Pressbooks #81

Open josieg opened 6 years ago

josieg commented 6 years ago

Description

On the CNX platform, glossary terms appear in bold, but the bold is not always carried through when importing into Pressbooks. I have imported two books where the bold does come through, and two where it does not, and I cannot figure out the different behaviours.

Glossary terms in OpenStax books are marked with the following html in the CNX platform: <span data-type="term">Key Term</span>.

In some books (Intro to Sociology 2e, Anatomy and Physiology) the data-type attribute is stripped out durring the Pressbooks import, which means the word does not appear bolded : <span>Key Term</span>

In other books I've imported (Biology 2e, Business Ethics), the data-type attribute is not stripped out of the span tag during the Pressbooks import, which means those glossary terms will appear bolded.

Expected behaviour

I expect words that are marked as glossary terms on the CNX platform will also be marked as glossary terms in Pressbooks.

This could be acheived by stoping the data-type attribute from being stripped out, but it would be even greater (but maybe too far-fetched?) if we could automatically integrate OpenStax glossary terms into the new Pressbooks glossary tool when it is released. This might actually be possible with a few OpenStax books that were published more recently, because their glossary words seem to have ID's attached to them?? e.g., <span data-type="term" id="term1" group-by="e">ethics</span>

Actual Bahaviour

When words that are marked as glossary terms in CNX are imported to Pressbooks, the bold style that marks the word as a glossary term is sometimes lost, depending on the book you are importing. My guess is it has to do with the data-type attribute being stripped out, but I don't know why it happens in some cases and not others.

Here are the Pressbooks copies of all books mentioned above:

Steps to reproduce the problem

  1. Import a chapter from Intro to Sociology 2e OpenStax that has glossary terms in it. For example: https://cnx.org/contents/AgQDEnLI@11.1:XZe6d2Jr@11/What-Is-Sociology (See bolded words under "What are Society and Culture" heading)
  2. Look at that chapter in Pressbooks. See that those words are no longer bolded. For example: https://pressbooks.bccampus.ca/testingopenstaxtake2/chapter/what-is-sociology/