MCPcopy Index your code
hub / github.com/postcss/postcss / loadAnnotation

Method loadAnnotation

lib/previous-map.js:73–85  ·  view source on GitHub ↗
(css)

Source from the content-addressed store, hash-verified

71 }
72
73 loadAnnotation(css) {
74 let comments = css.match(/\/\*\s*# sourceMappingURL=/g)
75 if (!comments) return
76
77 // sourceMappingURLs from comments, strings, etc.
78 let start = css.lastIndexOf(comments.pop())
79 let end = css.indexOf('*/', start)
80
81 if (start > -1 && end > -1) {
82 // Locate the last sourceMappingURL to avoid pickin
83 this.annotation = this.getAnnotationURL(css.substring(start, end))
84 }
85 }
86
87 loadFile(path, cssFile, trusted) {
88 /* c8 ignore next 5 */

Callers 1

constructorMethod · 0.95

Calls 1

getAnnotationURLMethod · 0.95

Tested by

no test coverage detected