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

feature idea: special attributes from PHP Markdown Extra #257

Open
ec1oud opened this issue Jul 12, 2024 · 0 comments
Open

feature idea: special attributes from PHP Markdown Extra #257

ec1oud opened this issue Jul 12, 2024 · 0 comments

Comments

@ec1oud
Copy link
Contributor

ec1oud commented Jul 12, 2024

https://michelf.ca/projects/php-markdown/extra/#spe-attr

For me, it comes up because Doxygen makes some use of this feature:

https://www.doxygen.nl/manual/markdown.html#md_header_id

which might be useful for Qt internal docs (e.g. https://contribute.qt-project.org/doc/d7/de2/md_qtdeclarative_2src_2qml_2memory_2design.html comes from a markdown file) , which got me thinking that maybe I'd like to support such a feature in Qt-based editors. (Qt uses md4c) Being able to make links at a finer granularity than the whole page sounds useful (albeit with the usual HTML limitations: not quite fine-grained enough, and needing to explicitly make linkable subsections rather than being able to link to arbitrary parts with no prior planning).

Currently if I write

## Header 2 ##      {#header2}

all of the text past the initial ## is part of the heading text. (TBH I don't understand why they want the second ##: I hope that is meant to be optional. Didn't test with PHP so far.)

Class names and custom attributes could be useful too, but I haven't thought that through yet. I want to have support for CSS to directly style markdown in Qt some day, but it's not there yet; if it were there, classes would be useful. Custom attributes... does it harmonize with the use of YAML headers? (which Qt doesn't parse, but you can extract from QTD::frontMatter ), maybe... needs more thought and experimentation.

Of course we shouldn't complicate the C API too much with these features.

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

No branches or pull requests

1 participant