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

v3.0 - Update schema for inline code #164

Closed
d0c-s4vage opened this issue Oct 18, 2022 · 0 comments
Closed

v3.0 - Update schema for inline code #164

d0c-s4vage opened this issue Oct 18, 2022 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@d0c-s4vage
Copy link
Owner

d0c-s4vage commented Oct 18, 2022

Describe the Feature Request
Inline code should be able to be customizable with:

  • left/right padding - number of spaces to add to the left/right of the inline code
  • highlighting style - use this pygments style to highlight the inline code
  • code language used - assume all inline code is this language

Tips

This will involve:

  • Creating a new schema in lookatme/schemas.py to hold the inline code settings (maybe nested inside a general "code" schema? then it'd be "styles.code.inline.<inline_style>"
  • Adding the new top-level schema to the main StyleSchema

Maybe something like this:

class InlineCodeSchema(Schema):
    ...

class CodeSchema(Schema):
    inline = fields.Nested(InlineCodeSchema, ...)

class StyleSchema(Schema):
    ...
    code = fields.Nested(CodeSchema, ...)
    ...

Pull Request Target

Be sure to make the 3.0-dev branch the PR target!

@d0c-s4vage d0c-s4vage added the enhancement New feature or request label Oct 18, 2022
@d0c-s4vage d0c-s4vage added this to the v3.0 milestone Oct 18, 2022
d0c-s4vage added a commit that referenced this issue Dec 11, 2022
Adds the ability to enable line numbers in code blocks and highlight lines

Specifically:
* Curly brace attributes on code blocks are now supported
* the theme can now be set in the YAML metadata:
  ```yaml
  ---
  theme: light
  ---
  ```
* a new `styles.code` YAML metadata value can be used:
  ```markdown
  ---
  styles:
    code:
      style: zenburn
      inline_lang: python
      bg_override: "#aabbcc"
  ---
  ```
* the `--style` CLI argument is removed (should be replaced by the feature described in #190)

See #164
See #89
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

1 participant