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

docs: fix syntax errors and line highlights #1004

Merged
merged 4 commits into from
Feb 9, 2022

Conversation

michaelbrewer
Copy link
Contributor

@michaelbrewer michaelbrewer commented Feb 4, 2022

Issue #, if available:

Description of changes:

  • fix line number highlights
  • fix missing imports
  • fix syntax error
  • fix indents
  • fix example code rendering

Checklist

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.


View rendered docs/core/event_handler/api_gateway.md
View rendered docs/tutorial/index.md

@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Feb 4, 2022
@boring-cyborg boring-cyborg bot added the documentation Improvements or additions to documentation label Feb 4, 2022
@codecov-commenter
Copy link

codecov-commenter commented Feb 4, 2022

Codecov Report

Merging #1004 (95b990d) into develop (6869155) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1004   +/-   ##
========================================
  Coverage    99.96%   99.96%           
========================================
  Files          119      119           
  Lines         5347     5347           
  Branches       610      610           
========================================
  Hits          5345     5345           
  Partials         2        2           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6869155...95b990d. Read the comment docs.

@heitorlessa
Copy link
Contributor

Besides tutorial, I wonder how this happened and how we can prevent this from happening again.

Need to run git blame. Not sure if it was always there, people's markdown linter (happened before), something else entirely.

Might be worth experiment with code snippets being separate Python files that can be lint - Cons is line highlights that become slightly more laborious but should pay off (--8<-)

@pull-request-size pull-request-size bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 4, 2022
@michaelbrewer
Copy link
Contributor Author

michaelbrewer commented Feb 4, 2022

Besides tutorial, I wonder how this happened and how we can prevent this from happening again.

Need to run git blame. Not sure if it was always there, people's markdown linter (happened before), something else entirely.

Might be worth experiment with code snippets being separate Python files that can be lint - Cons is line highlights that become slightly more laborious but should pay off (--8<-)

Importing from an actual example helps (coz you can run the some linters and auto formatting. Otherwise the line high lights suck, i wish it was different ie:

	  ```python title="My title" marker="(<)"
	  import json  #  (<)
	  
	  # Another one to highlight (<)	  
	  ```

@heitorlessa
Copy link
Contributor

Besides tutorial, I wonder how this happened and how we can prevent this from happening again.

Need to run git blame. Not sure if it was always there, people's markdown linter (happened before), something else entirely.

Might be worth experiment with code snippets being separate Python files that can be lint - Cons is line highlights that become slightly more laborious but should pay off (--8<-)

https://squidfunk.github.io/mkdocs-material/reference/code-blocks/

We use this in parts of the doc. Need to give a try to see if line highlights still work. If it does, then change Makefile and CI to lint them -- this will
prevent from happening and have all snippets formatted consistently too

Other bits can be solved with a markdown linter.

@michaelbrewer
Copy link
Contributor Author

@heitorlessa adding #1013 in risk of this issue being closed.

@heitorlessa
Copy link
Contributor

Thanks a lot again @michaelbrewer - merging it before we release it

@heitorlessa heitorlessa merged commit 5a5bf19 into aws-powertools:develop Feb 9, 2022
@heitorlessa heitorlessa deleted the fix-docs branch February 9, 2022 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants