diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1da5720..548d881 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,8 +4,22 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+
## [Unreleased]
+No changes
+
+
+
+## [1.1.0] - 2019-09-13
+### Fixed
+- Compatibility with `autolinker` plugin -- disabled autolinking except within comments.
+### Removed
+- Removed hardcoded list of "known" types and field names -- all field names are treated the same way now.
+
+
+
## [1.0.0] - 2019-03-17
### Added
- Added initial regexes for parsing BibTeX files in PrismJS framework.
@@ -14,4 +28,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[Unreleased]: https://github.com/SaswatPadhi/prismjs-bibtex/compare/v1.0.0...HEAD
-[1.0.0]: https://github.com/SaswatPadhi/prismjs-bibtex/releases/tag/v1.0.0
\ No newline at end of file
+[1.0.0]: https://github.com/SaswatPadhi/prismjs-bibtex/releases/tag/v1.0.0
+[1.0.0]: https://github.com/SaswatPadhi/prismjs-bibtex/releases/tag/v1.1.0
\ No newline at end of file
diff --git a/README.md b/README.md
index 34dd573..bcf0789 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,16 @@
-[PrismJS] is great! The minified core is less than 6 KB, the API is gorgeous,
+PrismJS-BibTeX
+
+========
+
+[PrismJS] is great! The minified core is less than ~5 KB, the API is gorgeous,
and although it uses simple regex matching, it is surprisingly accurate in most cases.
However, although it officially supports 175 languages currently, there is no support for [BibTeX] 😒 ...
-So here is a BibTeX language extension for PrismJS! 😁
+So here is a BibTeX language extension for PrismJS!
Thanks to the fantastic extension support in PrismJS,
it took me less than an hour and only about 60 lines to write the initial version.
-The minified JS file is less than 1.5 KB and all you need to do to highlight those BibTeX snippets,
-is just load it after `prism.js`.
+The minified JS file is less than 1 KB and all you need to do to highlight those BibTeX snippets, is just load it after `prism.js`.
@@ -31,18 +34,16 @@ Using this extension is super simple --- just import `prism-bibtex.min.js` in th
For example:
```html
-
-
-
+
+
+
```
-The `defer` attribute delays the script execution (but not download) until the HTML page has been parsed completely.
-
## » Usage with Node
-Install the package using `npm install prismjs-biblatex`.
+Install the package using `npm install prismjs-bibtex`.
diff --git a/docs/Gemfile b/docs/Gemfile
index 25f7840..2d4c50f 100644
--- a/docs/Gemfile
+++ b/docs/Gemfile
@@ -1,6 +1,3 @@
source 'https://rubygems.org'
-gem 'jekyll', '~> 3.4'
-gem "github-pages", group: :jekyll_plugins
-gem 'wdm', '~> 0.1', :install_if => Gem.win_platform?
-gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]
\ No newline at end of file
+gem 'github-pages', group: :jekyll_plugins
\ No newline at end of file
diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock
index 4ac078a..e32e82c 100644
--- a/docs/Gemfile.lock
+++ b/docs/Gemfile.lock
@@ -1,13 +1,13 @@
GEM
remote: https://rubygems.org/
specs:
- activesupport (4.2.10)
+ activesupport (4.2.11.1)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
- addressable (2.5.2)
- public_suffix (>= 2.0.2, < 4.0)
+ addressable (2.7.0)
+ public_suffix (>= 2.0.2, < 5.0)
coffee-script (2.4.1)
coffee-script-source
execjs
@@ -16,7 +16,7 @@ GEM
commonmarker (0.17.13)
ruby-enum (~> 0.5)
concurrent-ruby (1.1.5)
- dnsruby (1.61.2)
+ dnsruby (1.61.3)
addressable (~> 2.5)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
@@ -27,13 +27,13 @@ GEM
execjs (2.7.0)
faraday (0.15.4)
multipart-post (>= 1.2, < 3)
- ffi (1.10.0)
+ ffi (1.11.1)
forwardable-extended (2.6.0)
- gemoji (3.0.0)
- github-pages (197)
- activesupport (= 4.2.10)
+ gemoji (3.0.1)
+ github-pages (198)
+ activesupport (= 4.2.11.1)
github-pages-health-check (= 1.16.1)
- jekyll (= 3.7.4)
+ jekyll (= 3.8.5)
jekyll-avatar (= 0.6.0)
jekyll-coffeescript (= 1.1.1)
jekyll-commonmark-ghpages (= 0.1.5)
@@ -81,13 +81,13 @@ GEM
octokit (~> 4.0)
public_suffix (~> 3.0)
typhoeus (~> 1.3)
- html-pipeline (2.10.0)
+ html-pipeline (2.12.0)
activesupport (>= 2)
nokogiri (>= 1.4)
http_parser.rb (0.6.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
- jekyll (3.7.4)
+ jekyll (3.8.5)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
@@ -105,9 +105,9 @@ GEM
jekyll-coffeescript (1.1.1)
coffee-script (~> 2.2)
coffee-script-source (~> 1.11.1)
- jekyll-commonmark (1.2.0)
+ jekyll-commonmark (1.3.1)
commonmarker (~> 0.14)
- jekyll (>= 3.0, < 4.0)
+ jekyll (>= 3.7, < 5.0)
jekyll-commonmark-ghpages (0.1.5)
commonmarker (~> 0.17.6)
jekyll-commonmark (~> 1)
@@ -185,7 +185,7 @@ GEM
jekyll-seo-tag (~> 2.0)
jekyll-titles-from-headings (0.5.1)
jekyll (~> 3.3)
- jekyll-watch (2.1.2)
+ jekyll-watch (2.2.1)
listen (~> 3.0)
jemoji (0.10.2)
gemoji (~> 3.0)
@@ -204,14 +204,14 @@ GEM
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.11.3)
- multipart-post (2.0.0)
- nokogiri (1.10.1)
+ multipart-post (2.1.1)
+ nokogiri (1.10.4)
mini_portile2 (~> 2.4.0)
- octokit (4.13.0)
+ octokit (4.14.0)
sawyer (~> 0.8.0, >= 0.5.3)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
- public_suffix (3.0.3)
+ public_suffix (3.1.1)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
ffi (~> 1.0)
@@ -219,16 +219,16 @@ GEM
ruby-enum (0.7.2)
i18n
ruby_dep (1.5.0)
- rubyzip (1.2.2)
+ rubyzip (1.2.4)
safe_yaml (1.0.5)
- sass (3.7.3)
+ sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
- sawyer (0.8.1)
- addressable (>= 2.3.5, < 2.6)
- faraday (~> 0.8, < 1.0)
+ sawyer (0.8.2)
+ addressable (>= 2.3.5)
+ faraday (> 0.8, < 2.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
@@ -236,17 +236,13 @@ GEM
ethon (>= 0.9.0)
tzinfo (1.2.5)
thread_safe (~> 0.1)
- unicode-display_width (1.5.0)
- wdm (0.1.1)
+ unicode-display_width (1.6.0)
PLATFORMS
ruby
DEPENDENCIES
github-pages
- jekyll (~> 3.4)
- tzinfo-data
- wdm (~> 0.1)
BUNDLED WITH
- 1.16.5
+ 2.0.2
diff --git a/docs/acm-turing-awards.md b/docs/acm-turing-awards.md
index ccf1e0d..a658db2 100644
--- a/docs/acm-turing-awards.md
+++ b/docs/acm-turing-awards.md
@@ -3285,10 +3285,15 @@ Source:
}{% endraw %}
```
-
-
-
-
+
+
\ No newline at end of file
diff --git a/docs/biblatex-examples.md b/docs/biblatex-examples.md
index 9aaa31d..47b776e 100644
--- a/docs/biblatex-examples.md
+++ b/docs/biblatex-examples.md
@@ -1669,10 +1669,15 @@ Source:
-
-
-
+
+
\ No newline at end of file
diff --git a/docs/index.md b/docs/index.md
index ebbdf82..06cff7b 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,13 +1,12 @@
-[PrismJS] is great! The minified core is less than 6 KB, the API is gorgeous,
+[PrismJS] is great! The minified core is less than ~5 KB, the API is gorgeous,
and although it uses simple regex matching, it is surprisingly accurate in most cases.
However, although it officially supports 175 languages currently, there is no support for [BibTeX] 😒 ...
-So here is a BibTeX language extension for PrismJS! 😁
+So here is a BibTeX language extension for PrismJS!
Thanks to the fantastic extension support in PrismJS,
it took me less than an hour and only about 60 lines to write the initial version.
-The minified JS file is less than 1.5 KB and all you need to do to highlight those BibTeX snippets,
-is just load it after `prism.js`.
+The minified JS file is less than 1 KB and all you need to do to highlight those BibTeX snippets, is just load it after `prism.js`.
@@ -17,25 +16,23 @@ Using this extension is super simple --- just import the JS file after all the r
In the `head` of you HTML document, you can add the following:
<!-- Import the desired stylesheet for Prism: (`solarizedlight` theme shown below). -->
-<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.15.0/themes/prism-solarizedlight.min.css"
- integrity="sha256-uv4VzRy3z4cpObdkSN+OCocMJpELBaOtNcmCa6Wgyws="
+<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/themes/prism-solarizedlight.min.css"
+ integrity="sha256-3cT9py3J5XXzJkB9HvDuXrIgL+db6zf7BF2F+TBYdoo="
rel="stylesheet" crossorigin="anonymous"/>
<!-- Import the main driver file for Prism. -->
-<script defer src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.15.0/prism.min.js"
- integrity="sha256-jc6y1s/Y+F+78EgCT/lI2lyU7ys+PFYrRSJ6q8/R8+o=" crossorigin="anonymous">
+<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/prism.min.js"
+ integrity="sha256-HWJnMZHGx7U1jmNfxe4yaQedmpo/mtxWSIXvcJkLIf4=" crossorigin="anonymous">
</script>
<!-- Import other components and plugins as desired. -->
<!-- Import the `prism-bibtex.js` extension. -->
-<script defer src="https://saswatpadhi.github.io/prismjs-bibtex/prism-bibtex.min.js"
- integrity="sha256-fGDTNGNhZgaIwZoMiPCbMC2ufG10eUT8UJRYEjgzxck=" crossorigin="anonymous">
+<script src="https://saswatpadhi.github.io/prismjs-bibtex/prism-bibtex.min.js"
+ integrity="sha256-LdLe3QDoMjP5ed5hKliTe+/DmOChPYalAAjUNS+j2Lg=" crossorigin="anonymous">
</script>
-The `defer` attribute delays the script execution (but not download) until the HTML page has been parsed completely.
-
## » Some Basic Examples
@@ -203,20 +200,26 @@ Example from
-
+
-
-
-
-
+
+
+
+
-
## » Large Real-Life Bibliographies
diff --git a/docs/prism-bibtex.min.js b/docs/prism-bibtex.min.js
index c4663ba..5935ae0 100644
--- a/docs/prism-bibtex.min.js
+++ b/docs/prism-bibtex.min.js
@@ -1 +1 @@
-var l=/\\(?:[`~@#$%^&()_=+{}\[\]\|\\:;"',\?\/]|[a-z]+\*?(?=\s*{?))/im,i={equation:{pattern:/(\$\$?)[^\$]+\1/im,alias:"function italic",inside:{tag:l}},tag:l};Prism.languages.bib={comment:/%.*/,special:{pattern:/(^\s*)@(?:(?:preamble|string(?=\s*[({]))|comment(?=\s*[{]))/im,lookbehind:!0,alias:"important"},type:{pattern:/(^\s*)@(?:article|book|booklet|conference|inbook|incollection|inproceedings|manual|mastersthesis|misc|phdthesis|proceedings|techreport|unpublished)(?=\s*{)/im,lookbehind:!0,alias:"function bold"},"unk-type":{pattern:/(^\s*)@[^,={}'"\s]+(?=\s*{)/im,lookbehind:!0,alias:"function"},name:{pattern:/([,{]\s*)[^,={}'"\s]+(?=\s*[,}])/im,lookbehind:!0,alias:"regex"},field:{pattern:/([,{(]\s*)(?:abstract|address|annote|author|booktitle|chapter|contents|copyright|crossref|doi|edition|editor|howpublished|institution|isbn|issn|journal|key|keywords|language|lccn|month|note|number|organization|pages|price|publisher|school|series|title|type|url|volume|year)(?=\s*=)/im,lookbehind:!0,alias:"keyword italic"},"unk-field":{pattern:/([,{(]\s*)[^,={}'"\s]+(?=\s*=)/im,lookbehind:!0,alias:"keyword"},number:{pattern:/(=\s*)[0-9]+(?=\s*[,}])/im,lookbehind:!0,alias:"string"},value:{pattern:/([=#]\s*){(?:[^{}]*|{(?:[^{}]*|{(?:[^{}]*|{[^}]*})*})*})*}/im,lookbehind:!0,alias:"string",greedy:!0,inside:i},"ref-string":{pattern:/([=#]\s*)[^,={}'"\s]+(?=\s*[#,}])/im,lookbehind:!0,alias:"keyword"},string:{pattern:/("|')(?:(?!\1)[^\\]|\\(?:\r\n|[\s\S]))*\1/im,greedy:!0,inside:i},symbol:/#/,punctuation:/[=,{}]/},Prism.languages.bibtex=Prism.languages.bib;
\ No newline at end of file
+var l=/\\(?:[`~@#$%^&()_=+{}\[\]\|\\:;"',\?\/]|[a-z]+\*?(?=\s*{?))/im,i={equation:{pattern:/(\$\$?)[^\$]+\1/im,alias:"function italic",inside:{tag:l}},tag:l};Prism.languages.bib={comment:/%.*/,special:{pattern:/(^\s*)@(?:(?:preamble|string(?=\s*[({]))|comment(?=\s*[{]))/im,lookbehind:!0,alias:"important"},type:{pattern:/(^\s*)@[^,={}'"\s]+(?=\s*{)/im,lookbehind:!0,alias:"function bold"},name:{pattern:/([,{]\s*)[^,={}'"\s]+(?=\s*[,}])/im,lookbehind:!0,alias:"regex"},field:{pattern:/([,{(]\s*)[^,={}'"\s]+(?=\s*=)/im,lookbehind:!0,alias:"keyword"},number:{pattern:/(=\s*)[0-9]+(?=\s*[,}])/im,lookbehind:!0,alias:"char"},value:{pattern:/([=#]\s*){(?:[^{}]*|{(?:[^{}]*|{(?:[^{}]*|{[^}]*})*})*})*}/im,lookbehind:!0,alias:"char",greedy:!0,inside:i},"ref-string":{pattern:/([=#]\s*)[^,={}'"\s]+(?=\s*[#,}])/im,lookbehind:!0,alias:"keyword"},char:{pattern:/("|')(?:(?!\1)[^\\]|\\(?:\r\n|[\s\S]))*\1/im,greedy:!0,inside:i},symbol:/#/,punctuation:/[=,{}]/},Prism.languages.bibtex=Prism.languages.bib;
\ No newline at end of file
diff --git a/docs/stoc_2010-2019.md b/docs/stoc_2010-2019.md
index a2def2b..eadc3b8 100644
--- a/docs/stoc_2010-2019.md
+++ b/docs/stoc_2010-2019.md
@@ -10300,10 +10300,15 @@ Source:
}{% endraw %}
```
-
-
-
-
+
+
\ No newline at end of file
diff --git a/package.json b/package.json
index 9a15a22..afee29c 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "prismjs-bibtex",
- "version": "1.0.0",
+ "version": "1.1.0",
"description": "A language definition for BibTeX in the PrismJS syntax-highlighting framework.",
"main": "prism-bibtex.js",
"dependencies": {
diff --git a/prism-bibtex.js b/prism-bibtex.js
index 4ef7f68..3725144 100644
--- a/prism-bibtex.js
+++ b/prism-bibtex.js
@@ -18,14 +18,9 @@ Prism.languages.bib = {
alias: 'important'
},
'type': {
- pattern: /(^\s*)@(?:article|book|booklet|conference|inbook|incollection|inproceedings|manual|mastersthesis|misc|phdthesis|proceedings|techreport|unpublished)(?=\s*{)/mi,
- lookbehind: true,
- alias: 'function bold'
- },
- 'unk-type': {
pattern: /(^\s*)@[^,={}'"\s]+(?=\s*{)/mi,
lookbehind: true,
- alias: 'function'
+ alias: 'function bold'
},
'name': {
pattern: /([,{]\s*)[^,={}'"\s]+(?=\s*[,}])/mi,
@@ -33,11 +28,6 @@ Prism.languages.bib = {
alias: 'regex'
},
'field': {
- pattern: /([,{(]\s*)(?:abstract|address|annote|author|booktitle|chapter|contents|copyright|crossref|doi|edition|editor|howpublished|institution|isbn|issn|journal|key|keywords|language|lccn|month|note|number|organization|pages|price|publisher|school|series|title|type|url|volume|year)(?=\s*=)/mi,
- lookbehind: true,
- alias: 'keyword italic'
- },
- 'unk-field': {
pattern: /([,{(]\s*)[^,={}'"\s]+(?=\s*=)/mi,
lookbehind: true,
alias: 'keyword'
@@ -45,12 +35,12 @@ Prism.languages.bib = {
'number': {
pattern: /(=\s*)[0-9]+(?=\s*[,}])/mi,
lookbehind: true,
- alias: 'string'
+ alias: 'char'
},
'value': {
pattern: /([=#]\s*){(?:[^{}]*|{(?:[^{}]*|{(?:[^{}]*|{[^}]*})*})*})*}/mi,
lookbehind: true,
- alias: 'string',
+ alias: 'char',
greedy: true,
inside: internal_tags
},
@@ -59,7 +49,7 @@ Prism.languages.bib = {
lookbehind: true,
alias: 'keyword'
},
- 'string': {
+ 'char': {
pattern: /("|')(?:(?!\1)[^\\]|\\(?:\r\n|[\s\S]))*\1/mi,
greedy: true,
inside: internal_tags