Patch #20288

Finalize CodeRay 1.1.0 upgrade

Added by Mischa The Evil over 3 years ago. Updated about 3 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Third-party libraries
Target version:3.2.0

Description

The current CodeRay CSS styles are still based on CodeRay 1.0.6 (included since Redmine 1.4.0) with the custom changes from r10132 (included since Redmine 2.1.0). Redmine 2.3.2 till 2.3.4 came with CodeRay 1.0.9, an upgrade that didn't needed changes in the CSS styles. Starting with 2.4.0 Redmine comes with CodeRay 1.1.0, a minor upgrade that came with new/changed token_kinds and lots of changes in the alpha stylesheet, that in turn is used as a base for Redmine's own CodeRay CSS styles. As such, this upgrade needed CSS stylesheet changes like done before in r7618 and r7623 (for 1.0.0 upgrade) and r9389 (for 1.0.6 upgrade). But these changes, plus an update of the Redmine core documentation that is shipped along the core (wiki_syntax_detailed_[markdown|textile].html), aren't integrated up until today.

This patch serial, made against source:/trunk@14420, fixes these issues and can be applied using "patch -p1 < 0001-...". It is produced using git format-patch, so the patches include all info (including extensive commit messages) from the commits I made on a local branch.

Note: these issues are affecting 2.6-stable, 3.0-stable, 3.1-stable and current trunk. This patch serial only provides fixes for current trunk. If backport-patches are needed (in case this patch serial doesn't merge cleanly on stable branches), let me know.

0001-Remove-debug-style-used-only-by-CodeRay-s-internal-d.patch Magnifier (931 Bytes) Mischa The Evil, 2015-07-11 10:26

0002-Remove-line-numbers-style-line-numbers-are-removed-p.patch Magnifier (858 Bytes) Mischa The Evil, 2015-07-11 10:26

0003-Update-styles-to-match-CodeRay-1.1.0-preserving-chan.patch Magnifier (5.83 KB) Mischa The Evil, 2015-07-11 10:26

0004-Update-the-i18n-ed-core-doc-to-match-CodeRay-1.1.0-c.patch Magnifier (136 KB) Mischa The Evil, 2015-07-15 07:24

0005-Add-a-note-about-case-insensitivity-of-CodeRay-langu.patch Magnifier (113 KB) Mischa The Evil, 2015-07-15 07:24

0006-Make-clear-that-syntax-highlighting-cannot-only-be-u.patch Magnifier (120 KB) Mischa The Evil, 2015-07-15 07:24

0007-Update-the-CodeRay-Ruby-syntax-highlight-example.patch Magnifier (372 KB) Mischa The Evil, 2015-07-15 07:24


Related issues

Duplicated by Redmine - Defect #17577: <code> blocks have no numbers, help shows line numbers fo... Closed

Associated revisions

Revision 14486
Added by Toshi MARUYAMA over 3 years ago

[#20288] Remove debug style (used only by CodeRay's internal debug scanner).

Contributed by Mischa The Evil.

Revision 14487
Added by Toshi MARUYAMA over 3 years ago

[#20288] Remove line-numbers style (line numbers are removed per r10131).

Contributed by Mischa The Evil.

Revision 14488
Added by Toshi MARUYAMA over 3 years ago

[#20288] Update styles to match CodeRay 1.1.0 (preserving changes of r10132).

This commit updates the CSS styles to match with CodeRay 1.1.0,
while it preserves the custom changes applied in r10132.

The CSS styles were still based on CodeRay 1.0.6 (included since
Redmine 1.4.0) with the custom changes from r10132 (included since
Redmine 2.1.0). Redmine 2.3.2 till 2.3.4 came with CodeRay 1.0.9,
an upgrade that didn't needed changes in the CSS styles. Starting
with 2.4.0 Redmine comes with CodeRay 1.1.0, a minor upgrade
that came with new/changed token_kinds and lots of changes in the
alpha stylesheet, that in turn is used as a base for Redmine's own
CodeRay CSS styles. As such, this upgrade needed CSS stylesheet
changes like done before in r7618 and r7623 (for 1.0.0 upgrade)
and r9389 (for 1.0.6 upgrade). But these changes, plus an update
of the Redmine core documentation that is shipped along the core
(wiki_syntax_detailed_[markdown|textile].html), aren't integrated
up untill today.

Contributed by Mischa The Evil.

Revision 14489
Added by Toshi MARUYAMA over 3 years ago

[#20288] Update the i18n'ed core doc to match CodeRay 1.1.0 capabilities.

This commit includes:

1. an update of the list of languages supported by CodeRay:

  * added:
    + clojure [added in CodeRay 1.0.x]
    + diff (patch) [added in CodeRay 0.8.x]
    + go [added in CodeRay 1.1.x]
    + haml [added in CodeRay 1.0.x]
    + lua [added in CodeRay 1.1.x]
    + sass [added in CodeRay 1.1.x]
    + taskpaper [added in CodeRay 1.1.x]
    + text (plain, plaintext) [never been documented in Redmine]
  * removed:
    - scheme [removed from CodeRay 1.0.x]
  * renamed:
    ~ erb (eruby, rhtml) [renamed from rhtml in CodeRay 1.0.x]

2. the inclusion of additional, comma-separated language mappings
   (aliases) inside parentheses:

  * cpp (c++, cplusplus)
  * delphi (pascal)
  * diff (patch)
  * erb (eruby, rhtml)
  * html (xhtml)
  * javascript (ecmascript, ecma_script, java_script, js)
  * ruby (irb)
  * text (plain, plaintext)
  * yaml (yml)

Regarding the i18n: I used English as the base language. The
changed sentence was the same in 94 out of 98 language files,
public\help\xx[-xx]\wiki_syntax_detailed_[markdown||textile].html.

The only four exceptions were:

  • cs; public\help\cs\wiki_syntax_detailed_textile.html
  • fr; public\help\fr\wiki_syntax_detailed_textile.html
  • ja; public\help\ja\wiki_syntax_detailed_textile.html
  • zh-tw; public\help\zh-tw\wiki_syntax_detailed_textile.html

In the above given files, the sentence containing the supported
languages is translated (and/or stylized). I have chosen to
replace the whole translated sentence with the new English base
sentence, as such leaving decisions about stylizing language names
to translators and the people that actually use the respective
languages. In general (and for English, as it's the base language)
I think we can better stick to non-capitalized language names to
prevent any formatting confusion.

Contributed by Mischa The Evil.

Revision 14490
Added by Toshi MARUYAMA over 3 years ago

[#20288] Add a note about case-insensitivity of CodeRay language names/aliases.

Regarding the i18n: I used English as the base language. The
changed sentence was the same in 93 out of 98 language files,
public\help\xx[-xx]\wiki_syntax_detailed_[markdown||textile].html.

The only five exceptions were:

  • cs; public\help\cs\wiki_syntax_detailed_textile.html
  • fr; public\help\fr\wiki_syntax_detailed_textile.html
  • ja; public\help\ja\wiki_syntax_detailed_textile.html
  • ru; public\help\ru\qiki_syntax_detailed_textile.html
  • zh-tw; public\help\zh-tw\wiki_syntax_detailed_textile.html

In the above given files, the changed sentence is translated. I
have replaced the whole translated sentence with the new English
base sentence, as such leaving new translations up to translators.

Contributed by Mischa The Evil.

Revision 14491
Added by Toshi MARUYAMA over 3 years ago

[#20288] Make clear that syntax highlighting cannot only be used in wiki pages.

Regarding the i18n: I used English as the base language. The
changed sentence was the same in 93 out of 98 language files,
public\help\xx[-xx]\wiki_syntax_detailed_[markdown||textile].html.

The only five exceptions were:

  • cs; public\help\cs\wiki_syntax_detailed_textile.html
  • fr; public\help\fr\wiki_syntax_detailed_textile.html
  • ja; public\help\ja\wiki_syntax_detailed_textile.html
  • ru; public\help\ru\qiki_syntax_detailed_textile.html
  • zh-tw; public\help\zh-tw\wiki_syntax_detailed_textile.html

In the above given files, the changed sentence is translated. I
have replaced the whole translated sentence with the new English
base sentence, as such leaving new translations up to translators.

Contributed by Mischa The Evil.

Revision 14492
Added by Toshi MARUYAMA over 3 years ago

[#20288] Update the CodeRay Ruby syntax highlight example.

This commit changes the following:

  • Remove line numbering from syntax highlight example.
  • Add span with 'CodeRay' class around the syntax highlight example.
  • Fix span classes in the syntax highlight example:
    • Ruby scanner changed from ':reserved' to ':keyword' with CodeRay 1.0.0.
  • Remove obsolete line numbering styles.
  • Fix internal stylesheet to match CodeRay 1.1.0 (preserving r10132's changes).
  • Sort internal styles and remove superfluous newlines between styles.

Contributed by Mischa The Evil.

History

#1 Updated by Mischa The Evil over 3 years ago

  • File deleted (0007-Update-the-CodeRay-Ruby-syntax-highlight-example.patch)

#2 Updated by Mischa The Evil over 3 years ago

  • File deleted (0006-Make-clear-that-syntax-highlighting-cannot-only-be-u.patch)

#3 Updated by Mischa The Evil over 3 years ago

  • File deleted (0005-Add-a-note-about-case-insensitivity-of-CodeRay-langu.patch)

#4 Updated by Mischa The Evil over 3 years ago

  • File deleted (0004-Update-the-i18n-ed-core-doc-to-match-CodeRay-1.1.0-c.patch)

#5 Updated by Mischa The Evil over 3 years ago

I did a rebase on my local branch to update the second part1 of this patch serial to fix an ugly spelling mistake (parenthesis -> parentheses). So here is an update of the respective patch files.

1 patch files 0001-0003 changes public/stylesheets/application.css (and were locally done on one branch) whereas patch files 0004-0007 changes public/help/xx[-xx]/wiki_syntax_detailed_[markdown||textile].html files (which were locally done on another branch).

#6 Updated by Toshi MARUYAMA over 3 years ago

  • Target version set to 3.2.0

#7 Updated by Jean-Philippe Lang about 3 years ago

  • Status changed from New to Closed

Looks like it can be closed.

#8 Updated by Go MAEDA about 3 years ago

  • Duplicated by Defect #17577: <code> blocks have no numbers, help shows line numbers for <code> blocks though added

Also available in: Atom PDF