page
        : PAGE_SYM S* IDENT? pseudo_page? S*
            '{' S* declaration [ ';' S* declaration ]* '}' S*
        ;
340869
def _parseAtPage(self, src):
        
        ctxsrc = src
        src = src[len('@page'):].lstrip()
        page, src = self._getIdent(src)
        if src[:1] == ':':
            pseudopage, src = self._getIdent(src[1:])
            page = page + '_' + pseudopage
        else:
            pseudopage = None

        #src, properties = self._parseDeclarationGroup(src.lstrip())

        # Containing @ where not found and parsed
        stylesheetElements = []
        src = src.lstrip()
        properties = []

        # XXX Extended for PDF use
        if not src.startswith('{'):
            raise self.ParseError('Ruleset opening \'{\' not found', src, ctxsrc)
        else:
            src = src[1:].lstrip()

        while src and not src.startswith('}'):
            if src.startswith('@'):
                # @media, @page, @font-face
                src, atResults = self._parseAtKeyword(src)
                if atResults is not None:
                    stylesheetElements.extend(atResults)
            else:
                src, nproperties = self._parseDeclarationGroup(src.lstrip(), braces=False)
                properties += nproperties
            src = src.lstrip()

        result = [self.cssBuilder.atPage(page, pseudopage, properties)]

        return src[1:].lstrip(), result
639831
def cms_fragment_render(identifier, page = @cms_page)
      node = page.fragment_nodes.detect { |n| n.identifier == identifier.to_s }
      return "" unless node
      node.renderable = true
      render inline: page.render([node])
    end
307264
function symbol(s, p) {
        var x = syntax[s];
        if (!x || typeof x !== 'object') {
            syntax[s] = x = {
                id: s,
                lbp: p,
                value: s
            };
        }
        return x;
    }
339005
function () {
            var output = [], isLazy, typeUtils = ariaUtilsType;
            var placeholders = this._pageConfig.pageComposition.placeholders || {};
            for (var placeholderName in placeholders) {
                if (placeholders.hasOwnProperty(placeholderName)) {
                    isLazy = false;
                    var singlePlaceholderArray = placeholders[placeholderName];

                    if (!typeUtils.isArray(singlePlaceholderArray)) {
                        singlePlaceholderArray = [singlePlaceholderArray];
                    }

                    for (var i = 0; i < singlePlaceholderArray.length; i += 1) {
                        if (singlePlaceholderArray[i].lazy) {
                            isLazy = true;
                        }
                    }
                    if (isLazy) {
                        output.push(placeholderName);
                    }
                }
            }
            return output;
        }
202888
def page_match(name, path)
      if (match = self.class.valid_filename?(path))
        @wiki.ws_subs.each do |sub|
          return true if Page.cname(name).downcase == Page.cname(match, sub).downcase
        end
      end
      false
    end
830864
function _processPages(siteDesc, prefix) {
    if (siteDesc.pages !== undefined && siteDesc.pages !== null) {
        //console.log('pages', siteDesc.pages, 'prefix', prefix);

        for (let i in siteDesc.pages) {
            _processElement(siteDesc.pages[i], prefix);
        }
    }
}
17907
def get_state_identifier_for_page(self, page):
        
        for identifier, page_info in list(self.tabs.items()):
            if page_info["page"] is page:  # reference comparison on purpose
                return identifier
993436
function findPageForPath (pages, path) {
  for (let i = 0; i < pages.length; i++) {
    const page = pages[i]
    if (page.path.toLowerCase() === path.toLowerCase()) {
      return page
    }
  }
  return {
    path: '',
    frontmatter: {}
  }
}
3722
function (separator, page, args) {

        // By default, we return page name without arguments.
        var ret = page;
        if (typeof args !== 'undefined') {
            if (args && args.length) {
                // Some arguments have been provided, add them.
                if (args.length !== 0) {
                    ret = page + separator + args.join(separator);
                }
            } else {
                // Argument isn't an array, add it.
                ret = page + separator + args;
            }
        }
        return ret;
    }
313002
function encodePage(output, page) {
    var book = output.getBook();
    var summary = book.getSummary();
    var fs = book.getContentFS();
    var file = page.getFile();

    // JS Page is based on the JSON output
    var result = JSONUtils.encodePage(page, summary);

    result.type = file.getType();
    result.path = file.getPath();
    result.rawPath = fs.resolve(result.path);

    deprecate.field(output, 'page.progress', result, 'progress', function() {
        return encodeProgress(output, page);
    }, '"page.progress" property is deprecated');

    deprecate.field(output, 'page.sections', result, 'sections', [
        {
            content: result.content,
            type: 'normal'
        }
    ], '"sections" property is deprecated, use page.content instead');

    return result;
}
126852
function parsePageFromString(page, content) {
    // Parse page YAML
    var parsed = fm(content);

    return page.merge({
        content:    parsed.body,
        attributes: Immutable.fromJS(parsed.attributes),
        dir:        direction(parsed.body)
    });
}
789588
function symbol(s, p) {
        var x = syntax[s];
        if (!x || typeof x !== 'object') {
            syntax[s] = x = {
                id: s,
                lbp: p || 0,
                string: s
            };
        }
        return x;
    }
716550
function(){
                /*
                 * margin :
                 *    margin_sym S* '{' declaration [ ';' S* declaration? ]* '}' S*
                 *    ;
                 */
                var tokenStream = this._tokenStream,
                    line,
                    col,
                    marginSym   = this._margin_sym();

                if (marginSym){
                    line = tokenStream.token().startLine;
                    col = tokenStream.token().startCol;

                    this.fire({
                        type: "startpagemargin",
                        margin: marginSym,
                        line:   line,
                        col:    col
                    });

                    this._readDeclarations(true);

                    this.fire({
                        type: "endpagemargin",
                        margin: marginSym,
                        line:   line,
                        col:    col
                    });
                    return true;
                } else {
                    return false;
                }
            }
1231448
public boolean canEdit(Page page) {
        List<String> permTypes = new ArrayList<String>();
        permTypes.add(SpacePermission.CREATEEDIT_PAGE_PERMISSION);
        return getSpacePermissionManager().hasPermissionForSpace(getRemoteUser(), permTypes, page.getSpace());
    }
1243045
function encodePage(page, summary) {
    var file = page.getFile();
    var attributes = page.getAttributes();
    var article = summary.getByPath(file.getPath());

    var result = attributes.toJS();

    if (article) {
        result.title = article.getTitle();
        result.level = article.getLevel();
        result.depth = article.getDepth();

        var nextArticle = summary.getNextArticle(article);
        if (nextArticle) {
            result.next = encodeSummaryArticle(nextArticle);
        }

        var prevArticle = summary.getPrevArticle(article);
        if (prevArticle) {
            result.previous = encodeSummaryArticle(prevArticle);
        }
    }

    result.content = page.getContent();
    result.dir = page.getDir();

    return result;
}
130165
function wxappEntry() {

  const regex = /src\/pages\/([^\/]+)\/[^\.]+.js/;
  
  return {
    entry: () => {

      let pages = {}
      let core = []

      glob.sync(`./src/pages/**/*.js`).forEach(x => {
        const name = x.match(regex)[1]
        const key = `pages/${name}/${name}`
        pages[key] = x
      })

      return Object.assign({}, pages, {
        app: [
          //'webpack-dev-server/client',
          //'webpack/hot/only-dev-server',
          './src/app.js'
        ]
      })
    }
  }
}
463247
def get_standard(self):
        """"""
        try:
            res = urlopen(PARSELY_PAGE_SCHEMA)
        except:
            return []
        text = res.read()
        if isinstance(text, bytes):
            text = text.decode('utf-8')
        tree = etree.parse(StringIO(text))
        stdref = tree.xpath("//div/@about")
        return [a.split(':')[1] for a in stdref]