-
Notifications
You must be signed in to change notification settings - Fork 239
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
Improve rendering of XDXF #570
Conversation
pyglossary/plugins/xdxf/__init__.py
Outdated
@@ -125,6 +123,9 @@ class Reader: | |||
|
|||
_html: bool = True | |||
_xsl: bool = False | |||
_has_added_css: bool = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These class attrs are used for read/write options! Don't use them to keep an "instance state" that you then change internally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switch to instance attrs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, fixed ruff errors
Fix ruff errors. |
2ee9f62
to
5a4ec00
Compare
Add an option to enable css. |
Do you mean, that CSS rules should be part of |
On second thought, let's create a new plugin called |
I have no idea how to add a new plugin to pyglossary. I can revert |
Just add a new module/package in |
* created a list (ol / ul) for nested <def>s * show js tooltips for abbreviations * fix showing hidden <gr> * add braces to <co> * show CSS instead of inlined HTML tags for: <ex>, <pos>, <abbr>, <k>, <gr>, <mrkd>
5a4ec00
to
10552f0
Compare
I pushed the proposed changes, but it would mean I have to have 2 different |
- use CSS for all XDXF element (decrease size of output dict file) - created a list (ol / ul) for nested `<def>`s - support loading of `<abbreviations>` data - show js tooltips for abbreviations - fixed showing hidden `<gr>` - fixed losing spaces before XDXF tags - add braces to `<co>` - show CSS instead of inlined HTML tags for: `<ex>, <pos>, <abbr>, <k>, <gr>, <mrkd>`
I merged this into master with these fixes:
|
Completed:
<def>
s<abbreviations>
data<gr>
<co>
<ex>, <pos>, <abbr>, <k>, <gr>, <mrkd>
Screenshot: