-
-
Notifications
You must be signed in to change notification settings - Fork 102
Converter fixes/simplifications #2132
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
base: master
Are you sure you want to change the base?
Conversation
…ipt. Simplify the conversion functions by using "Moinpage tree" elements `<sub>` and `<sup>` instead of `<span baseline-shift="sub"> and `<span baseline-shift="sub/super"> for subscript and superscript.
Replace `visit_xhtml_br()` with an entry in `simple_tags`. Add descriptive comments to the ignored tags as a record of the rationale to ignore them.
…oinpage tag. Use a more generic element in the Moinpage tree and store the original tag in the "html-tag" attribute for HTML elements without matching markup syntax in lightwight markup languages, e.g., `<cite>` → `<emphasis html-tag="cite}">`. This replaces the storage as class value (`<emphasis class="html-cite}">`). (Since HTML output restores the original tag, the attribute is only required in the internal representation. A dedicated attribute simplifies storage and retrieval.)
"The aside element represents a section of a page that consists of content that is tangentially related to the content around the aside element, and which could be considered separate from that content. Such sections are often represented as sidebars in printed typography." Use it for reStructuredText "topic" and "sidebar" directives. Adapt common.css.
Include attributes supported by `html_out.Attributes` (class, id, title, ...) in the start tag of HTML inline elements. Now, e.g., `<span class="orange">apple</span>` survives a round-trip.
…e change. HTML deprecated hard coded style changes already in HMTL 4.1. (While `<big>` is now obsolete, `<small>` got new semantics.) Moinwiki markup allows changing the font size with the syntax `~-smaller-~` and `~+larger+~`. Up to now, these were internally stored as `<span font-size="85%">` and `<span font-size="120%">`. HTML output converted spans with these font-size values to spans with class values "moin-big" and "moin-small" with rules for `.moin-big` and `.moin-small` in "common.css". Other values of the "font-size" attribute were ignored. This patch changes the input converters to use the class values already in the internal representation, so that the "font-size" attribute is redundant.
|
@gmilde, can you please explain the TODOs that you added in html_in.py here? |
Sure.
See #2113 for discussion of "monospace" elements.
I don't think we should ignore the content of deprecated tags or alternative content to the "dangerous" tags (
Table captions are supported in rST (but currently not by Moin). They are not dangerous and could easily be supported for HTML and Markdown and probably also Docbook markup.
I suggest rendering the content of the deprecated
"The
Moin HTML ignores frames and script. So it should IMO behave similar to a browser and handle the content of the fallback elements |
|
All tests were fine after the original commit. After merging the recent changes, the "Windows" package test failed -- unfortunately without any error message. The downloadable log says: |
|
Thanks for your additional comments.
This is just a sporadic CI failure. The rerun was successful. |
A series of converter patches involving changes to the internal representation
as "Moinwiki tree elements" to simplify the conversion code.
visit_xhtml_br()with an entry insimple_tags.<aside>element.Closes #2109.