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

Support for inserting heading marker #15

Open
unhammer opened this issue Apr 1, 2021 · 3 comments
Open

Support for inserting heading marker #15

unhammer opened this issue Apr 1, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@unhammer
Copy link

unhammer commented Apr 1, 2021

From man apertium-deshtml:

     -o      Inserts a "❡" (U+2761 CURVED STEM PARAGRAPH SIGN ORNAMENT) at the
             end of <h[1–6]> and <title> tags.

e.g.

$ echo '<h1>Historisk sjokktap koronafriskmeldt</h1>' |apertium-deshtml -o
.[][<h1>]Historisk sjokktap koronafriskmeldt[]❡.[][<\/h1>
] 

We'd like to use transfuse for https://gtweb.uit.no/apy/ but we'd also like to mark headings/titles with this symbol so CG can treat it as "heading language" (no need for full sentences etc.)

Could we have an option in transfuse to do this? (Unless there's some alternative way of dealing with it that would be even better?)

@TinoDidriksen TinoDidriksen added the enhancement New feature or request label Jun 2, 2021
@TinoDidriksen
Copy link
Owner

Right, that is an oversight in the format. Inline tags bring the tag with them into the stream so that rules can query them as needed, but block tags don't. Injecting []❡ to get feature parity is fine as a start - can work on a better solution later.

Should this also be done for attributes such as title="" ( https://github.com/TinoDidriksen/Transfuse/blob/master/src/format-html.cpp#L140 )?

@unhammer
Copy link
Author

unhammer commented Jun 2, 2021

After reading https://html.spec.whatwg.org/multipage/dom.html#the-title-attribute https://www.tpgi.com/using-the-html-title-attribute-updated/ https://www.24a11y.com/2017/the-trials-and-tribulations-of-the-title-attribute/ I would say, yes – if title is used as intended, it seems like it should include a lot of typical "tittelspråk", at the same time it seems to be discouraged so it probably doesn't matter that much.

@TinoDidriksen
Copy link
Owner

Implemented for HTML h1-h6 and attr title. Still need to implement for ODT, DOCX, TXT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants