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

html kbd KeyboardTransform does not work when using the dirhtml builder #9961

Closed
page-down opened this issue Dec 12, 2021 · 1 comment
Closed
Labels
builder:html type:enhancement enhance or introduce a new feature
Milestone

Comments

@page-down
Copy link

Describe the bug

If you use sphinx.builders.dirhtml.DirectoryHTMLBuilder to generate a document, then :kbd: will not use KeyboardTransform to do the transformation. There are other html-based builders that are affected.

sphinx/builders/html/transforms.py

class KeyboardTransform(SphinxPostTransform):
    # ...
    builders = ('html',)

Is it possible to enable :kbd: conversion support for other HTML-based builders? Thanks.

How to Reproduce

$ make dirhtml

Expected behavior

:kbd:`ctrl+s`
<kbd>
    <kbd>ctrl</kbd>+<kbd>s</kbd>
</kbd>

Your project

n/a

Screenshots

No response

OS

Linux

Python version

3.9

Sphinx version

4.3.1

Sphinx extensions

No response

Extra tools

No response

Additional context

Feature Request # 7530
Convert :kbd: to nested < kbd > HTML elements

@tk0miya tk0miya added type:enhancement enhance or introduce a new feature builder:html and removed type:bug labels Dec 19, 2021
@tk0miya tk0miya added this to the 4.4.0 milestone Dec 19, 2021
@tk0miya
Copy link
Member

tk0miya commented Dec 19, 2021

Thank you for reporting. I did not notice that. I'll fix it soon.

tk0miya added a commit that referenced this issue Dec 22, 2021
…_builders

Close #9961: html: Support nested <kbd> HTML elements in other HTML builders
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
builder:html type:enhancement enhance or introduce a new feature
Projects
None yet
Development

No branches or pull requests

2 participants