Skip to content

Commit

Permalink
Fixed syntax highlighting of code blocks in markdown (#532)
Browse files Browse the repository at this point in the history
  • Loading branch information
anders-kiaer authored Oct 8, 2021
1 parent ba75ad0 commit e3fa44b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#498](https://github.com/equinor/webviz-config/pull/498) - Explicitly use UTC when comparing time zones in the `OAuth` implementation.
- [#476](https://github.com/equinor/webviz-config/pull/476) - Use Azure SDK Python packages instead of wrapping Azure CLI.
- [#521](https://github.com/equinor/webviz-config/pull/521) - Improved performance on deployment workflow for Webviz applications with large data sets. Also allow for empty commits (i.e. redeployment of same application triggering new build).
- [#532](https://github.com/equinor/webviz-config/pull/532) - Fixed syntax highlighting of code blocks in markdown.

### Added
- [#503](https://github.com/equinor/webviz-config/pull/503) - Added `__main__.py`. This will allow users to do `python -m webviz_config [...]` in addition to `webviz [...]`.
Expand Down
7 changes: 7 additions & 0 deletions examples/example-markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,10 @@ First Header | Second Header
------------ | -------------
Content Cell | Content Cell
Content Cell | Content Cell

#### Some code

```python
def some_function(input: int) -> int:
return 42 * input
```
1 change: 1 addition & 0 deletions webviz_config/generic_plugins/_markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ def __init__(self, markdown_file: Path):
markdown.markdown(
get_path(self.markdown_file).read_text(),
extensions=[
"fenced_code",
"tables",
"sane_lists",
_WebvizMarkdownExtension(base_path=markdown_file.parent),
Expand Down

0 comments on commit e3fa44b

Please sign in to comment.