asciidoctor / asciidoctor-firefox-addon

:wolf: An add-on for Mozilla Firefox that converts AsciiDoc files to HTML directly in the browser using Asciidoctor.js.
https://addons.mozilla.org/en-US/firefox/addon/asciidoctorjs-live-preview/
MIT License
32 stars 9 forks source link

Resolves #40, handle URI with query parameters #41

Closed ggrossetie closed 9 years ago

ggrossetie commented 9 years ago

The regexp could be simpler:

/\.a(sciidoc|doc|d|sc)/i

Meaning, containing .asciidoc, .adoc, .ad, .asc but I think this is too vague. Instead I'm using a more complex regexp:

/\.a(sciidoc|doc|d|sc)$|\.a(sciidoc|doc|d|sc)\?|/i

Meaning, ending with .asciidoc, .adoc, .ad or .asc OR containing .asciidoc?, .adoc?, .ad? or .asc?. With this regexp the following URI will not match:

http://some/uri/with/.ad/index.html