|
3208e348
|
2017-05-29T15:34:02
|
|
temporarily remove type annotation support
|
|
98867cf0
|
2017-05-29T15:28:00
|
|
initial commit
|
|
07a6806b
|
2017-05-24T09:05:27
|
|
Support CSS #RRGGBBAA (#1139)
Add support for CSS #RRGGBBAA notation.
|
|
5df26e23
|
2017-05-13T09:57:11
|
|
Check for possible pre-existing marker strings in Smarty
|
|
7a1a4042
|
2017-05-13T09:45:45
|
|
Check for possible pre-existing marker strings in Handlebars
|
|
36bc560e
|
2017-05-13T09:34:37
|
|
Check for possible pre-existing marker strings in PHP
|
|
ba64f8dc
|
2017-05-13T08:19:59
|
|
Add missing noCSS property for the Custom Class plugin
|
|
1453fa7c
|
2017-05-08T22:37:39
|
|
Merge pull request #1100 from zeitgeist87/FixPHP
Fix the PHP language
|
|
6530709e
|
2017-05-08T22:36:56
|
|
Merge pull request #1095 from zeitgeist87/FixGreedy
Fix corner cases for the greedy flag
|
|
e13fdfa4
|
2017-02-08T17:19:22
|
|
Add minor optimizations for the greedy flag
|
|
1736f4aa
|
2017-02-08T01:36:27
|
|
Fix corner cases for the greedy flag
By refactoring the tokenize() method into two separate methods, it is
possible to recursively clean up any broken tokens left by the greedy
feature.
This should fix the issue 1075.
|
|
3ce74880
|
2017-03-30T18:39:16
|
|
Add support for the <?= delimiter in PHP
|
|
84107fab
|
2017-02-10T17:44:45
|
|
Use different replacement marker for PHP, because curly braces are
highlighted as punctuation in JavaScript and CSS.
|
|
0a00d7f7
|
2017-02-10T17:10:19
|
|
Fix the PHP language
This patch is an attempt to fix the PHP language, when it is combined
with markup.
The problem is, that markup has a higher priority than all other tokens.
This leads to weird errors, where HTML tags are highlighted inside of
comments #197. One solution to this was to set the `greedy` flag for the
comment token, but this leads to far worse errors like #1097.
This patch should fix both issues #197 and #1097, by switching the
grammar to markup on the fly. One potential problem is, that it relies
on the `<?php` tag to detect if markup is present. So if a PHP file
contains only markup and no PHP code at all, the result will look
broken.
|
|
62cdaf80
|
2017-05-08T13:39:11
|
|
Ruby: Add support for =begin =end comments. Manual merge of #1121.
|
|
65cbaa95
|
2017-05-08T13:27:57
|
|
Run gulp after #1107
|
|
88300817
|
2017-05-08T13:26:16
|
|
VB.Net: Add example + tests + fix regexps
|
|
54006515
|
2017-05-08T13:01:33
|
|
Merge branch 'gh-pages' of https://github.com/Bigsby/prism-1 into Bigsby-gh-pages
|
|
8aa2cc4a
|
2017-05-08T13:56:50
|
|
Replace [\w\W] with [\s\S] and [0-9] with \d in regexes (#1107)
* Replace [\w\W] with [^] and [0-9] with \d in regexes
* Replace [\s\S] with [^]
* Replace [^] with [\s\S]
|
|
3a409222
|
2017-05-08T12:54:53
|
|
Run gulp after #1033
|
|
01a59d81
|
2017-05-08T12:54:33
|
|
Merge branch 'idleberg-gh-pages' into gh-pages
# Conflicts:
# components/prism-nsis.min.js
|
|
48bbc397
|
2017-05-08T12:54:17
|
|
Fix tests for #1033
|
|
3a157172
|
2017-05-08T12:53:16
|
|
Merge branch 'gh-pages' of https://github.com/idleberg/prism into idleberg-gh-pages
# Conflicts:
# components/prism-nsis.js
# components/prism-nsis.min.js
# tests/languages/nsis/constant_feature.test
|
|
2094221b
|
2017-05-08T12:33:12
|
|
APL: Run gulp + updated test after #1126
|
|
a5f3cdbd
|
2017-05-08T11:31:14
|
|
Update prism-apl.js (#1126)
Add @ (At) and ⌺ (Stencil), two new dyadic operators coming in Dyalog APL version 16.0.
|
|
9f649fbe
|
2017-05-08T12:05:35
|
|
JavaScript: Properly match every operator as a whole token. Fix #1133
|
|
ea8a2ca2
|
2017-05-08T11:46:05
|
|
Merge remote-tracking branch 'official/gh-pages' into gh-pages
|
|
6df2cebc
|
2017-05-08T11:45:31
|
|
Keep markup plugin: Store highlightedCode after reinserting markup. Fix #1127
|
|
70cb4729
|
2017-05-08T11:44:21
|
|
Run before-highlight and after-highlight hooks even when no grammar is found. Fix #1134
|
|
a7a47653
|
2017-03-28T00:01:43
|
|
Add prism-vbnet.min.js
|
|
b846339f
|
2017-03-27T23:59:53
|
|
Add vbnet.js
|
|
1f699e7c
|
2017-03-09T23:34:33
|
|
.npmignore: Unignore components.js (#1108)
For the trick suggested by @apfelbox in
https://github.com/PrismJS/prism/issues/593#issuecomment-219856317
to work, we need both of these files to be in the NPM package:
/components.js
/tests/helper/components.js
|
|
867ea428
|
2017-03-02T08:26:05
|
|
JSX: Fix highlighting of attributes containing spaces
|
|
0a3d2a98
|
2017-03-02T08:08:14
|
|
Run gulp
|
|
125bff10
|
2017-03-02T16:07:01
|
|
Update Crystal keywords (#1092)
- Add `select`, `uninitialized` and `__END_LINE__`
- Remove `ifdef`
|
|
224fdb8a
|
2017-02-13T18:47:14
|
|
Avoid conflict between line-highlight and other plugins
The line-highlight plugin should not overwrite env.code, because other
plugins (e.g. normalize-whitespace) might have modified it.
|
|
79b723dc
|
2017-02-13T17:37:43
|
|
Cleanup left-over line-highlight tags before other plugins run
The tags used by the line-highlight plugin are appended to the <code>
tag. This causes problems with the autoloader plugin, because the
tags contain whitespace and therefore change the content of the <code>
tag.
This patch fixes the issue #1101, by removing any line-highlight tags
with the `before-sanity-check` hook.
|
|
6c7dae20
|
2017-02-11T01:09:09
|
|
Add Node.js support for the normalize-whitespace plugin
|
|
867c11da
|
2017-02-10T14:01:10
|
|
Fix path to deleted example file
|
|
bf551967
|
2017-02-08T23:25:12
|
|
Clean up no longer relevant failures in examples
|
|
f047d6f6
|
2017-02-08T23:24:03
|
|
Remove some trailing commas
|
|
7549eccb
|
2017-02-08T23:23:24
|
|
Add missing greedy config in APL, AutoIt, Dart, Elixir, Erlang, F#, Go, Haxe, Icon, Inform7, J, Makefile, Mel, Nim, Nix, NSIS, OCaml, Oz, Pari/GP, Parser, Pascal, Perl, Prolog, Pure, Qore, R, Rip, Ruby, Rust, SAS, Scheme, SQL, Stylus, Tcl and Verilog
|
|
c40de4f4
|
2017-02-08T08:39:03
|
|
JSX: Add test for spread inside tag
|
|
6c148d7c
|
2017-02-08T08:34:49
|
|
Run gulp
|
|
561bceb5
|
2017-02-08T13:04:02
|
|
fixes #1061 JSX spread operator break (#1094)
* fixes #1061 JSX spread operator break
* simplify jsx tag regexp
|
|
565a2ccf
|
2017-02-07T23:42:48
|
|
YAML: Make strings greedy (partial fix for #1075)
|
|
1a5e7a43
|
2017-02-07T23:41:23
|
|
LOLCODE: Make strings greedy
|
|
dffadc69
|
2017-02-07T23:28:33
|
|
Remove dead link in Third-party tutorials section. Fixes #1028
|
|
dfb6f17e
|
2017-02-07T23:21:20
|
|
C#: Fix wrong highlighting when three slashes appear inside string. Fix #1091
|
|
d6e068aa
|
2017-01-28T10:36:10
|
|
Run gulp
|
|
f531294f
|
2017-01-28T10:35:59
|
|
Add tests for Django
|
|
345b1b2a
|
2017-01-28T11:08:49
|
|
Adds Django/Jinja2 language definition (#1085)
|
|
7192ffef
|
2017-01-28T09:57:30
|
|
Run gulp
|
|
3d42640e
|
2017-01-28T09:57:21
|
|
APL: Update test after #1072
|
|
12238c5d
|
2017-01-28T08:53:49
|
|
Add left shoe underbar and right shoe underbar (#1072)
They're used by NARS2000, and left shoe underbar will be used by Dyalog APL.
|
|
bafc4cb6
|
2017-01-24T16:31:10
|
|
Initial implementation of manual highlighting (#1087)
* Initial implementation of manual highlighting
Borrow the `manual` property of whatever already existing Prism instance
there is.
* Simplify setting of `Prism.manual`
Cleans up the implementation w/ less code.
|
|
a708730c
|
2017-01-18T08:44:55
|
|
Ruby: Fix slash regex performance. Fix #1083
|
|
0ca13530
|
2017-01-10T21:09:36
|
|
JSON: Fix property and string patterns performance. Fix #1080
|
|
23c6e8a0
|
2017-01-10T21:08:48
|
|
Run gulp
|
|
52020a00
|
2016-12-05T07:17:38
|
|
Update typescript keywords (#1064)
* Update TypeScript keyword list
* Add comment with URL to TS spec
|
|
4fa29a9f
|
2016-12-05T16:02:54
|
|
Set up auto npm publishing
|
|
22df673c
|
2016-12-03T14:11:25
|
|
Release 1.6.0
|
|
b8ce1e7c
|
2016-12-03T11:52:48
|
|
Merge branch 'gh-pages' of https://github.com/PrismJS/prism into gh-pages
# Conflicts:
# components/prism-core.min.js
|
|
83bafbd4
|
2016-12-03T11:46:26
|
|
env.code can be modified by before-sanity-check hook even when using language-none. Fix #1066
|
|
17e33bc0
|
2016-11-20T12:52:54
|
|
Reduce risk of XSS (#1051)
* Skip non-own properties of env.attributes
Use `Object.keys` instead of a for-in loop to find optional attributes.
The former only grabs keys that are own properties, the latter also
includes inherit properties from `Object.prototype`.
This reduces the risk of XSS if an attacker somehow manages to
manipulate the prototype chain of the Object prototype.
* Fix root cause of XSS in autolinker plugin #1054
* command-line plugin: Safely encode attributes
If an attacker has control over the values of the attributes
"data-prompt", "data-user", or "data-host", then XSS was possible.
This fixes the issue, by encoding quotes as the `"` entity.
* show-language plugin: innerHTML -> textContent
There is no need for `innerHTML` here. At best nothing happens,
at worst XSS is possible (though the odds are negligible since
the attacker would have to control the detected language).
* toolbar plugin: innerHTML -> textContent
|
|
02514710
|
2016-11-19T12:18:05
|
|
Run gulp
|
|
3cae6ce8
|
2016-11-19T12:16:31
|
|
Add support for Reason. Fix #1046
|
|
d0746065
|
2016-11-09T08:50:52
|
|
use real-world example
|
|
2538ff9f
|
2016-11-09T08:45:51
|
|
add test for new patterns
|
|
07b81ac7
|
2016-11-08T20:08:49
|
|
Plugins: Toolbar & Copy to Clipboard (#891)
* Add prism-toolbar plugin
This plugin exposes a `registerButton` method, which other
plugins can use to add buttons to the toolbar. Comes with
styles.
* Add demo file for toolbar plugin
Registers a "Hello World!" tag with the toolbar.
* Make `toolbar.registerButton` polymorphic
This allows developers to provide either a callback or an object
with a `text` string and an optional `onClick` function to create
a new button.
* Add Toolbar & Copy to Clipboard to components.js
* Add Copy to Clipboard plugin
* Switch `innerHTML` to `textContent`
This ensures additional HTML can't be passed to the toolbar
via the `text` property, ensuring a consistent display for the
buttons.
* Use `call` to bind `this` to the `onClick` method
This provides access to the clicked element, which is what `this`
is usually bound to on event listeners.
* Add hover animation to toolbar
* Add drop shadow to toolbar buttons
* Add `clipboard` to `optionalDependencies`
This will install Clipboard.js when installing from `npm`, but
won't fail the build if the installation of Clipboard.js fails.
* Load Clipboard.js from CDN if not present
* Display plugin code using data-src
* Recompile prism-toolbar
* Update Show Languages to be a Toolbar button
Show Languages now registers a callback with the toolbar
plugin to return an element with the language in it.
* Add basic HTML API & documentation
The Toolbar will now be able to read a `data-label` attribute
and add it to the code snippet.
* Switch a -> button when only providing onClick
Also adds a `url` property which creats an anchor tag and sets
the href. Adds some styles to override the button defaults.
* Add support for data-url to create anchor tag
This allows the HTML API to create links in the Toolbar.
* Update toolbar to allow order controlled via HTML
Uses a data-attribute on the `body` tag to update the order,
should the user choose to do so.
* Allow template element to provide content to label
This provides one of several options a user can implement in order to
get a custom button.
Also fixes some bugs in the documentation.
* Fix bug when combined with the autoloader plugin
The autoloader will rehighlight the element after the language arrives.
This means the complete hook can run multiple times. Without a check,
multiple toolbars can get added to an element.
|
|
25cdd3f0
|
2016-11-09T02:01:40
|
|
Ini: Fix test after #1047
|
|
dfc19413
|
2016-11-09T01:57:46
|
|
Add support for the Jolie language (#1014)
* Added component for the Jolie language
* Added Jolie among the supported components
* update for merge
- revised jolie component
- added tests
- added code example
- minified with `gulp`
* fixes
* fixes
* fixed Jolie html file example and highlight for punctuation
* fixed indentation in test html file and added comma as punctuation
|
|
d75da8ee
|
2016-11-09T01:29:22
|
|
Fix order of decoding entities in groovy (#1049) (#1050)
|
|
8b0520a8
|
2016-11-09T01:27:40
|
|
Ruby: Make strings greedy. Fixes #1048
|
|
b42fa779
|
2016-11-09T01:26:50
|
|
Ini: Remove newline at end of minified file.
|
|
b15d43b4
|
2016-11-09T01:24:55
|
|
Ruby: Fix test after #1023
|
|
fe8ad8b8
|
2016-11-01T23:44:54
|
|
Remove important token in ini definition (#1047)
* rename prism-ini section token to selector
* updated min file
* use [ \t] instead of the more general \s
|
|
cba78f3e
|
2016-10-29T02:57:09
|
|
Add missing `from` keyword to typescript & set `ts` as alias. (#1042)
|
|
32cd99ff
|
2016-10-24T21:21:37
|
|
Fix greedy-flag bug
This bug occurs in the relatively rare case of a pattern matching the
empty string. It was reported in issue #1039. If for example a HTML
page contains an empty script tag `<script></script>` then the script
pattern will match anything inside, which is the empty string.
This empty string is then passed to the constructor of the Token class.
Since `""` is falsy in Javascript the property `matchedStr` is set to
`null`.
But the property `matchedStr` is needed to calculate the current
position for the greedy feature. A `null` value in `matchedStr` results
in a `pos` that is `NaN`. This causes the bug described in issue #1039.
Since the property `matchedStr` is only ever needed to calculate the
length of the Token, it is more efficient to store the length directly
instead of the string. As a side effect this also fixes issue #1039.
|
|
03ecf742
|
2016-10-23T21:25:50
|
|
Add yarn.lock (#1035)
Since many people are like going to use `yarn` over `npm`, it's probably a good idea to add this
|
|
4723e533
|
2016-10-15T23:23:58
|
|
update constant pattern
|
|
ad46101c
|
2016-10-15T23:22:53
|
|
remove long-deprecated command
|
|
76ba1b83
|
2016-10-11T08:11:15
|
|
update patterns (#1032)
Updated NSIS
|
|
2e634aff
|
2016-10-10T23:53:19
|
|
update following suggestions
|
|
9c93b9a4
|
2016-10-10T23:52:45
|
|
update test cases
|
|
d1144d0b
|
2016-10-10T22:53:48
|
|
Test suite: fixed missing diff in error message
|
|
bf50d751
|
2016-10-10T13:16:04
|
|
move constants to separate file
|
|
ea711a79
|
2016-10-10T13:06:03
|
|
Update prism-nsis.min.js
|
|
524ff00e
|
2016-10-10T13:05:25
|
|
Changes
* add `m` flag
* use pattern from `keywords` for `important`
* switch constants & variables (oversight!)
|
|
599abcd3
|
2016-10-10T00:03:12
|
|
separate variables and constants
|
|
ca319daf
|
2016-10-09T23:07:18
|
|
update patterns
|
|
a0bd686e
|
2016-09-30T19:53:42
|
|
Merge pull request #950 from dvkndn/gh-pages
add plugin custom class name
|
|
4cbdf4d2
|
2016-09-30T14:50:11
|
|
Reverse prism markup min
|
|
25a541d6
|
2016-09-28T21:16:33
|
|
JSON: Fixed issues with properties and strings + added tests. Fix #1025
|
|
fa68f913
|
2016-09-28T15:07:19
|
|
Fix grammar in Readme
|
|
5916430f
|
2016-09-23T23:28:40
|
|
Update CHANGELOG
|
|
ac21d337
|
2016-09-23T22:31:02
|
|
Update APL minified file + update test for iota underbar function
|
|
d9f8ae48
|
2016-09-23T22:28:03
|
|
Merge remote-tracking branch 'official/master' into gh-pages
|
|
3c5c89ac
|
2016-09-22T14:32:00
|
|
Add iota underbar (#1024)
It's used by NARS2000 now, and will be used by Dyalog APL in the future.
|
|
22cb0187
|
2016-09-14T05:44:22
|
|
Fix typo `Fload` to `Float` in prism-ruby.js (#1023)
|