mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
Wrap HTML in comments in backticks, so as not to fool docco when generating the annotated source
This commit is contained in:
@@ -24,7 +24,7 @@ base64encode = (src) -> switch
|
||||
when typeof Buffer is 'function'
|
||||
new Buffer(src).toString('base64')
|
||||
when typeof btoa is 'function'
|
||||
# The contents of a <script> block are encoded via UTF-16, so if any extended
|
||||
# The contents of a `<script>` block are encoded via UTF-16, so if any extended
|
||||
# characters are used in the block, btoa will fail as it maxes out at UTF-8.
|
||||
# See https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#The_Unicode_Problem
|
||||
# for the gory details, and for the solution implemented here.
|
||||
|
||||
@@ -133,7 +133,7 @@ exports.isLiterate = (file) -> /\.(litcoffee|coffee\.md)$/.test file
|
||||
|
||||
# Throws a SyntaxError from a given location.
|
||||
# The error's `toString` will return an error message following the "standard"
|
||||
# format <filename>:<line>:<col>: <message> plus the line with the error and a
|
||||
# format `<filename>:<line>:<col>: <message>` plus the line with the error and a
|
||||
# marker showing where the error is.
|
||||
exports.throwSyntaxError = (message, location) ->
|
||||
error = new SyntaxError message
|
||||
|
||||
Reference in New Issue
Block a user