Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

Commit

Permalink
Remove RawGit dependency. (#573)
Browse files Browse the repository at this point in the history
  • Loading branch information
ncruces authored and mikesamuel committed Mar 5, 2019
1 parent f20e152 commit b5fa4d1
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 22 deletions.
12 changes: 6 additions & 6 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@

## 29 March 2007

* Added [tests](https://rawgit.com/google/code-prettify/master/tests/prettify_test.html#PHP)
* Added [tests](https://raw.githack.com/google/code-prettify/master/tests/prettify_test.html#php)
for PHP support to address issue [#3](https://github.com/google/code-prettify/issues/3).
* Fixed bug [#6](https://github.com/google/code-prettify/issues/6): `prettyPrintOne`
was not halting. This was not reachable through the normal entry point.
* Fixed bug [#4](https://github.com/google/code-prettify/issues/4): recursing into a
script block or PHP tag that was not properly closed would not silently drop the content.
([test](https://rawgit.com/google/code-prettify/master/tests/prettify_test.html#issue4))
([test](https://raw.githack.com/google/code-prettify/master/tests/prettify_test.html#js_script))
* Fixed bug [#8](https://github.com/google/code-prettify/issues/8): was eating tabs
([test](https://rawgit.com/google/code-prettify/master/tests/prettify_test.html#issue8))
([test](https://raw.githack.com/google/code-prettify/master/tests/prettify_test.html#issue8))
* Fixed entity handling so that the caveat

> Caveats: please properly escape less-thans. `x&lt;y` instead of `x<y`,
Expand Down Expand Up @@ -51,7 +51,7 @@
* Support for `nocode` spans to allow embedding of line numbers and code
annotations which should not be styled or otherwise affect the tokenization
of prettified code. See the issue [#22](https://github.com/google/code-prettify/issues/22)
[testcase](https://rawgit.com/google/code-prettify/master/tests/prettify_test.html#issue22).
[testcase](https://raw.githack.com/google/code-prettify/master/tests/prettify_test.html#issue22).

## 6 Jan 2009

Expand Down Expand Up @@ -99,7 +99,7 @@

## 4 March 2011

* Added a [themes gallery](https://rawgit.com/google/code-prettify/master/styles/index.html)
* Added a [themes gallery](https://raw.githack.com/google/code-prettify/master/styles/index.html)
to showcase contributed styles.
* Added support for XQuery courtesy *Patrick Wied*, Nemerle courtesy *Zimin A.V.*,
and Latex support courtesy *Martin S*.
Expand All @@ -126,7 +126,7 @@

* Added a one script autoload&run mechanism and a way to embed hints in
processing instructions/comments. See
[example](https://rawgit.com/google/code-prettify/master/examples/quine.html).
[example](https://raw.githack.com/google/code-prettify/master/examples/quine.html).

## 4 March 2013

Expand Down
Binary file modified distrib/prettify-small.zip
Binary file not shown.
12 changes: 6 additions & 6 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ code here
</pre>
```

[Larger example](https://rawgit.com/google/code-prettify/master/examples/quine.html)
[Larger example](https://raw.githack.com/google/code-prettify/master/examples/quine.html)

## Auto-Loader

You can load the JavaScript and CSS for prettify via one URL:

```HTML
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
<script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js"></script>
```

This will load the entire system and schedule the prettifier to run on page
Expand All @@ -47,18 +47,18 @@ arguments) to configure the runner.
| --------------------- | ------- | ------------------------------ |
| autorun=(true, false) | true | run automatically on page load |
| lang=... | none | Loads the language handler for the given language which is usually the file extension for source files for that language. See the [index of language handlers](../src). If specified multiple times (`?lang=css&lang=ml`) then all are loaded. |
| skin=... | none | See the [skin gallery](https://cdn.rawgit.com/google/code-prettify/master/styles/index.html). If specified multiple times, the first one to successfully load is used. |
| skin=... | none | See the [skin gallery](https://raw.githack.com/google/code-prettify/master/styles/index.html). If specified multiple times, the first one to successfully load is used. |
| callback=js_ident | | `window.exports["js_ident"]` will be called when prettyprinting finishes. If specified multiple times, all are called. |

For example:

```HTML
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js?lang=css&amp;skin=sunburst"></script>
<script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js?lang=css&amp;skin=sunburst"></script>
```

The above specifies the `lang` parameter to also load the CSS language
extension and the `skin` parameter to load the
[*sunburst*](https://cdn.rawgit.com/google/code-prettify/master/styles/index.html#sunburst)
[*sunburst*](https://raw.githack.com/google/code-prettify/master/styles/index.html#sunburst)
skin.

## Serving your own JS & CSS
Expand Down Expand Up @@ -87,7 +87,7 @@ so you can swap in a different stylesheet to change the way code is
prettified.

The easiest way to create your own stylesheet is by starting with one from the
[style gallery](https://cdn.rawgit.com/google/code-prettify/master/styles/index.html)
[style gallery](https://raw.githack.com/google/code-prettify/master/styles/index.html)
and tweaking it.

You can use CSS `@media` rules to specify styles that work well with printers
Expand Down
4 changes: 2 additions & 2 deletions examples/quine.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<title>Making Quines Prettier</title>
<!-- The defer attribute is not necessary for autoloading, but is necessary
for the script at the bottom to work as a Quine. -->
<script src="https://rawgit.com/google/code-prettify/master/loader/run_prettify.js?autoload=true&amp;skin=sunburst&amp;lang=css" defer></script>
<script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js?autoload=true&amp;skin=sunburst&amp;lang=css" defer></script>
<style type="text/css">
.operative { font-weight: bold; border: 1px solid yellow; }
#quine { border: 4px solid #88c; }
Expand All @@ -26,7 +26,7 @@ <h1>Making Quines Prettier</h1>
The line numbers to the left appear because the preceding comment
<code>&lt;?prettify lang=html linenums=true?&gt;</code> turns on
line-numbering and the
<a href="https://rawgit.com/google/code-prettify/master/styles/index.html">stylesheet</a>
<a href="https://raw.githack.com/google/code-prettify/master/styles/index.html">stylesheet</a>
(see <code>skin=sunburst</code> in the <code>&lt;script src&gt;</code>)
specifies that every fifth line should be numbered.
</p>
Expand Down
6 changes: 3 additions & 3 deletions js-modules/run_prettify.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* +------------------+---------------+------------------------------+--------+
* | skin= | skin name | Loads the skin stylesheet | none. |
* | | | named "<NAME>.css". | |
* | | | https://cdn.rawgit.com/ | |
* | | | https://raw.githack.com/ | |
* | | | google/code-prettify/master/ | |
* | | | styles/index.html | |
* +------------------+---------------+------------------------------+--------+
Expand All @@ -56,7 +56,7 @@
* 2. Loads the sunburst.css stylesheet instead of the default prettify.css
* stylesheet.
* A gallery of stylesheets is available at
* https://cdn.rawgit.com/google/code-prettify/master/styles/index.html
* https://raw.githack.com/google/code-prettify/master/styles/index.html
* 3. Since autorun=false is not specified, calls prettyPrint() on page load.
* </div>
*/
Expand Down Expand Up @@ -180,7 +180,7 @@
// This only works if this script is loaded via https : something
// over which we exercise no control.
var LOADER_BASE_URL =
'https://cdn.rawgit.com/google/code-prettify/master/loader';
'https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader';

for (var i = 0, n = langs.length; i < n; ++i) (function (lang) {
var script = doc.createElement("script");
Expand Down
4 changes: 2 additions & 2 deletions loader/run_prettify.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/run_prettify.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* +------------------+---------------+------------------------------+--------+
* | skin= | skin name | Loads the skin stylesheet | none. |
* | | | named "<NAME>.css". | |
* | | | https://cdn.rawgit.com/ | |
* | | | https://raw.githack.com/ | |
* | | | google/code-prettify/master/ | |
* | | | styles/index.html | |
* +------------------+---------------+------------------------------+--------+
Expand All @@ -56,7 +56,7 @@
* 2. Loads the sunburst.css stylesheet instead of the default prettify.css
* stylesheet.
* A gallery of stylesheets is available at
* https://cdn.rawgit.com/google/code-prettify/master/styles/index.html
* https://raw.githack.com/google/code-prettify/master/styles/index.html
* 3. Since autorun=false is not specified, calls prettyPrint() on page load.
* </div>
*/
Expand Down Expand Up @@ -228,7 +228,7 @@ var IN_GLOBAL_SCOPE = false;
// This only works if this script is loaded via https : something
// over which we exercise no control.
var LOADER_BASE_URL =
'https://cdn.rawgit.com/google/code-prettify/master/loader';
'https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader';

for (var i = 0, n = langs.length; i < n; ++i) (function (lang) {
var script = doc.createElement("script");
Expand Down

0 comments on commit b5fa4d1

Please sign in to comment.