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
Update Asciidoc markup example with safe defaults #24920
Merged
techknowlogick
merged 2 commits into
go-gitea:main
from
omenos:update-asciidoctor-example
May 25, 2023
Merged
Update Asciidoc markup example with safe defaults #24920
techknowlogick
merged 2 commits into
go-gitea:main
from
omenos:update-asciidoctor-example
May 25, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Change from 'asciidoc' to 'asciidoctor' for rendering. - GitHub renders previews under the "secure" profile. This is a reasonable default to demonstrate for those who may not be well versed in what Asciidoc can do or are not advanced sysadmins. - Add embedded parameter to strip out document containing tags that will otherwise be displayed in text form when rendered.
lunny
approved these changes
May 24, 2023
techknowlogick
approved these changes
May 25, 2023
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.
Thanks!
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
May 25, 2023
* upstream/main: (21 commits) `zh-cn` translation for usage docs (go-gitea#24897) Add chinese documentations for installation (go-gitea#24904) Improve RunMode / dev mode (go-gitea#24886) Add chinese documentations for `Packages` (go-gitea#24914) Rework notifications list (go-gitea#24812) New webhook trigger for receiving Pull Request review requests (go-gitea#24481) Use file filters action instead of Github's files filter (go-gitea#24877) Update Asciidoc markup example with safe defaults (go-gitea#24920) Add self to maintainers (go-gitea#23644) Create pull request for base after editing file, if not enabled on fork (go-gitea#24841) Reduce verbosity of dev commands (go-gitea#24917) Merge different languages for language stats (go-gitea#24900) Add missing test case and fix typo in tests (go-gitea#24915) Improve confusable character string (go-gitea#24911) Improve Actions CSS (go-gitea#24864) Fix <empty> in administration/config-cheat-sheet.en-us.md (go-gitea#24905) Only validate changed columns when update user (go-gitea#24867) Rename docs packages title from xxx Packages Repository -> xxx Package Registry (go-gitea#24895) Fix can’t move anymore items in repo project boards (go-gitea#24892) Make environment-to-ini support loading key value from file (go-gitea#24832) ... # Conflicts: # web_src/css/helpers.css
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The cheat sheet uses the
asciidoc
markup language to demonstrate how to set up third party markup renderers. The current example has the following issues:By switching to
asciidoctor
, uses are suggested to utilize de facto/standard tooling for AsciiDoc.The
--embedded
parameter will strip out HTML tags that contain the document (such as<html></html>
) which aren't necessary for the render, and actually end up as text in the document if left in.The
--safe-mode
parameter (of which there are several profiles) imposes certain policies on the files it ingests and what the resulting output looks like. GitHub itself uses thesecure
profile (the highest), which can be a good starting point for those who are uncertain of what to do. By default, if no mode is specified whenasciidoctor
runs it defaults tounsafe
, i.e. no safety guidelines at all.