gitblit icon indicating copy to clipboard operation
gitblit copied to clipboard

@ sign is expanded to markdown user link inside of code block

Open gitblit opened this issue 10 years ago • 1 comments

Originally reported on Google Code with ID 593

In a ticket body, code that includes an @ sign will be expanded and shown as a user
link.

###Related Code: 


    txtName.setOnTouchListener(new View.OnTouchListener() {
        @Override
        public boolean onTouch(View v, MotionEvent event) {
            if (event.getAction() == MotionEvent.ACTION_DOWN) {
                String szEcuName = szECUAbbr != null ? szECUAbbr : String.format("%03X",
nAddress);
                if (nError == BusDefines.NRC_positiveResponse) {
                    Toast.makeText(getActivity(), getString(R.string.clear_codes_success,
szEcuName), Toast.LENGTH_SHORT)
                            .show();
                } else {
                    Toast.makeText(getActivity(), getString(R.string.clear_codes_error,
szEcuName, nError, BusCommand.getErrorName(nError)), Toast.LENGTH_LONG)
                            .show();
                }
                return true;
            } else {
                return false;
            }
        }
    });


shows up as

txtName.setOnTouchListener(new View.OnTouchListener() {
    **[@Override](https://myserver:8443/user/Override)**
    public boolean onTouch(View v, MotionEvent event) {
        if (event.getAction() == MotionEvent.ACTION_DOWN) {
            String szEcuName = szECUAbbr != null ? szECUAbbr : String.format("%03X",
nAddress);
            if (nError == BusDefines.NRC_positiveResponse) {
                Toast.makeText(getActivity(), getString(R.string.clear_codes_success,
szEcuName), Toast.LENGTH_SHORT)
                        .show();
            } else {
                Toast.makeText(getActivity(), getString(R.string.clear_codes_error,
szEcuName, nError, BusCommand.getErrorName(nError)), Toast.LENGTH_LONG)
                        .show();
            }
            return true;
        } else {
            return false;
        }
    }
});

Reported by [email protected] on 2015-05-26 15:29:23

gitblit avatar Aug 12 '15 12:08 gitblit

Yeah, that is ugly.

The mention linking is done with a regex, not in the Markdown parser.  Would be nice
if Pegdown supported it internally.

Reported by James.Moger on 2015-05-27 12:02:08

gitblit avatar Aug 12 '15 12:08 gitblit