mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-11 13:46:11 +10:00
Fix cross-references that contain underscores ### What does this MR do? Cross-references that contain underscores confuse the Markdown renderer and don't work properly. For example: 1. In `myacct/project_one#456`, add a comment that includes a reference to `myacct/project_two#123`. 2. The comment in `myacct/project_one#456` links correctly. 3. The system note in `myacct/project_two#123` is incorrectly linked as: `mentioned in issue myacct/projectone#456_` This MR removes the use of the `_` character in the system notes to prevent Markdown confusion. See a full discussion in #1160. ### Are there points in the code the reviewer needs to double check? To preserve backwards compatibility with existing system notes, there is a SQL wildcard match for notes having underscores. This seemed safer than migrating all notes. ### Why was this MR needed? In an ideal world, the Markdown parser would be able to handle references containing underscores with or without escape sequences. However, there are a number of issues: 1. RedCarpet's parser for emphasis block is pretty dumb: it treats `#` as a word break and thus even the `intra_word_emphasis` flag has no effect. 2. The parser is in C and can't be changed easily. 3. There is no way to insert an escape sequence for emphasis blocks. The only way around this is to switch to something like CommonMark, which does support escape sequences. ### What are the relevant issue numbers / [Feature requests](http://feedback.gitlab.com/)? Issue #1160 ### Screenshots Before:  After:  See merge request !385
Documentation
User documentation
- API Automate GitLab via a simple and powerful API.
- Markdown GitLab's advanced formatting system.
- Permissions Learn what each role in a project (guest/reporter/developer/master/owner) can do.
- Project Services Integrate a project with external services, such as CI and chat.
- Public access Learn how you can allow public and internal access to projects.
- SSH Setup your ssh keys and deploy keys for secure access to your projects.
- Web hooks Let GitLab notify you when new code has been pushed to your project.
- Workflow Using GitLab functionality and importing projects from GitHub and SVN.
- GitLab as OAuth2 authentication service provider. It allows you to login to other applications from GitLab.
Administrator documentation
- Install Requirements, directory structures and installation from source.
- Integration How to integrate with systems such as JIRA, Redmine, LDAP and Twitter.
- Raketasks Backups, maintenance, automatic web hook setup and the importing of projects.
- Custom git hooks Custom git hooks (on the filesystem) for when web hooks aren't enough.
- System hooks Notifications when users, projects and keys are changed.
- Security Learn what you can do to further secure your GitLab instance.
- Update Update guides to upgrade your installation.
- Welcome message Add a custom welcome message to the sign-in page.
- Issue closing Customize how to close an issue from commit messages.
- Libravatar Use Libravatar for user avatars.
- Operations Keeping GitLab up and running
- Log system Log system
Contributor documentation
- Development Explains the architecture and the guidelines for shell commands.
- Legal Contributor license agreements.
- Release How to make the monthly and security releases.