-
Notifications
You must be signed in to change notification settings - Fork 46
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
Fix newline issue #176
Fix newline issue #176
Conversation
Signed-off-by: Paul Gesel <[email protected]>
Signed-off-by: Paul Gesel <[email protected]>
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.
Looks fine for me.
Fyi, I have to change the parameter description of joint_trajectory_controller because I used \pi
inside the description for rendering with sphinx -> without replacement of all \
it throws warnings now. But it still works, and output of ros2 param describe
looks way better.
@christophfroehlich Do you mind giving this PR an approval review once you have made the changes you need to make to the joint_trajectory_controller? |
f'"{line}"' for line in filtered_description.splitlines() | ||
) | ||
return filtered_description | ||
filtered_description = description.replace('\n', '\\n ') |
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.
Or this should be fine too? This would fix your indent and also the markdown syntax I added to JTC.
filtered_description = description.replace('\n', '\\n ') | |
# remove possible markdown/rst syntax, but add proper indent for cpp-header files. | |
filtered_description = description.replace('\\', '\\\\').replace('`', '').replace('\\n', '\\n ') |
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.
I added this change but made one small change. It should replace \n' with
\n' for the new liens to render correctly.
Signed-off-by: Paul Gesel <[email protected]>
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.
I tested it with joint_trajectory_controller, it works perfectly now.
Hello! Thank you for fixing it. When can we expect to have this fix released upstream? |
Newlines were breaking the code generation for Python #170. This PR fixes the issue and reformats the C++ to print better with
ros2 param describe...
The following out shows the new format.The old format was like this