-
Notifications
You must be signed in to change notification settings - Fork 0
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
Custom formatting for placeholder text #91
Comments
Here's one approach we could take: https://github.com/riptano/astra-vector-docs/pull/265 |
I'll add this item to this issue: I see that you have a PR (https://github.com/riptano/astra-vector-docs/pull/265) to add bold to placeholders in source codeblocks. I’m guessing you do something in the antora ui to accomodate this? I’m asking, because I have a need to use italics in source codeblocks that are [source, bash], a similar issue. This would allow both bash highlighting AND italicized optional parameters to be displayed on those codeblocks. Right now, I have to pick one or the other, and Jamie and I have been looking at the google developers style guide, where they use the italicized parameters for optional params, and normal font for required params. |
@polandll What you're describing doesn't appear to be an issue in the new UI. I ran the following test: [source,sql,subs="verbatim,quotes"]
----
CREATE TABLE smart_home.sensor_readings (
_device_id_ UUID,
room_id UUID,
reading_type TEXT,
reading_value DOUBLE,
reading_timestamp TIMESTAMP,
PRIMARY KEY (device_id, room_id, reading_timestamp)
) WITH CLUSTERING ORDER BY (room_id ASC, reading_timestamp DESC);
---- |
In the Google Developer Docs Style Guide, there are some recommendations for using enhanced text formatting for things like placeholders (both inline and in code blocks).
AsciiDoc provides pretty straightforward support for custom inline styles:
But code blocks are a bit trickier, and will likely require appropriate substitutions depending on whether we decide to use roles or HTML passthrough.
Update: Our current style guideline for using placeholders in code blocks can mess with syntax highlighting. If we were to add support for custom placeholder formatting in code blocks, we should make sure that it doesn't interfere with highlight.js's syntax parser.
The text was updated successfully, but these errors were encountered: