-
Notifications
You must be signed in to change notification settings - Fork 11
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
Documented DebOps fold format as example and fully support it in yaml2rst. #6
Conversation
Ref: debops/docs#156 (comment) One thing that @drybjed changed was to go from ```YAML # Main configuration [[[ # ------------------ ``` to: ```YAML # Main configuration [[[ # ---------------------- ``` This has the advantage that in case we ever manage to get syntax highlighting for the embedded RST syntax working in Vim, it will not complain about sections being to short. I tried it but I am not sure if that is possible as the `# ` in the input for the syntax highlighting in Vim would need to be stipped out and then passed to the `rst` syntax highlighting. Ref: http://vim.wikia.com/wiki/Different_syntax_highlighting_within_regions_of_a_file#Extended_version
…roject. Related to: debops/docs#156
`--strip-regex` was intentionally limited to the RST part of the input to avoid problems. `--yaml-strip-regex` allows to mess with the YAML part of the input if needed. Related to: debops#3 Related to: debops/docs#156
@@ -53,7 +53,9 @@ dist: | |||
examples: PYTHONPATH = . | |||
examples: | |||
PYTHONPATH=. | |||
bin/yaml2rst examples/main.yml examples/main.rst --strip-regex '\s*(:?\[{3}|\]{3})\d?$$' | |||
sed --regexp-extended 's/(\.\. )envvar(::)/\1note\2/;' examples/fold-markers-debops.yml examples/main.yml \ | |||
| bin/yaml2rst - examples/main.rst --strip-regex '\s*(:?\[{3}|\]{3})\d?$$' --yaml-strip-regex '^\s{66,67}#\s\]{3}\d?$$' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, This is very hard to read. I suggest using an intermediate target (is it examples/main.yml
?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. Done. You might need to use make examples -B
now as make
does not check all the dependencies of yaml2rst
(e. g. when you make a change in the Python module).
Thanks for the quick reaction. |
@htgoebel Good thing that you waited with the release. There was another extention needed because of a little redesign.
Docs: https://github.com/ypid/yaml2rst/blob/feature/yaml-fold-strip/docs/fold-markers.rst
Related to: #3
Related to: debops/docs#156