Automatic line-break fixes? #35
-
There is currently a minor issue with Modrinth and using the Release Body's content for the changelog. Modrinth requires line breaks to be made with two spaces, which a release does not. This means that a release body like this... ## Changes
Updated some dependencies.
[See what else has changed](https://example.com) ...becomes this on Modrinth when no spaces are added ## Changes
Updated some dependencies. [See what else has changed](https://example.com) Is there an easy way to fix this (Outside of remembering to always use double-spaces which I sure will forget :P) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
This is a part of the bigger issue, which I discussed in #19. In short, all platforms use different markdown engines (CurseForge's one being completely and utterly terrible), therefore in order to debate this problem mc-publish needs to present a concept of normalization of your changelogs/readmes, which will drastically increase the complexity level of the whole project, and I do not want that. While it may be worth doing for automatic update of project descriptions, it is clearly far from the optimal ratio of complexity/benefits, especially considering the fact the requested functionality can be easily implemented on the user side, namely:
- name: Obtain GitHub Release body
id: release_body
run: |
body=$'${{ github.event.release.body }}'
# Replace every newline symbol with two newline symbols
body="${body//$'\n'/$'\n\n'}"
# Escape `%`, `\n`, and `\r` in order for `set-output` to work
# https://github.com/orgs/community/discussions/26288
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
# Set the output
echo "::set-output name=body::$body"
- name: Upload assets to *, and Modrinth
uses: Kir-Antipov/[email protected]
with:
# ...
modrinth-changelog: ${{ steps.release_body.outputs.body }}
# ... |
Beta Was this translation helpful? Give feedback.
This is a part of the bigger issue, which I discussed in #19. In short, all platforms use different markdown engines (CurseForge's one being completely and utterly terrible), therefore in order to debate this problem mc-publish needs to present a concept of normalization of your changelogs/readmes, which will drastically increase the complexity level of the whole project, and I do not want that. While it may be worth doing for automatic update of project descriptions, it is clearly far from the optimal ratio of complexity/benefits, especially considering the fact the requested functionality can be easily implemented on the user side, namely:
Enter
key twice