Allow including other pages in the data.
193978
function loadIncludes(data, current_file) {
  return data.replace(includeExpr, function(src, name, ext) {
    try {
      var include_path =
          path.join(current_file, "../", name+"."+(ext || "markdown"))
      return loadIncludes(fs.readFileSync(include_path, "utf8"), current_file);
    } catch(e) {
      return "";
    }
  });
}
1040312
public void setHasTitlePage() {
        if(this.mode == MODE_SINGLE) {
            this.mode = MODE_MULTIPLE;
            headerFirst = new RtfHeaderFooter(this.document, headerAll, RtfHeaderFooter.DISPLAY_FIRST_PAGE);
            headerFirst.setType(this.type);
        }
    }
686656
def index(request, page):
    """"""
    days = []
    days_found = set()
    query = Entry.query.order_by(Entry.pub_date.desc())
    pagination = Pagination(query, PER_PAGE, page, "index")
    for entry in pagination.entries:
        day = date(*entry.pub_date.timetuple()[:3])
        if day not in days_found:
            days_found.add(day)
            days.append({"date": day, "entries": []})
        days[-1]["entries"].append(entry)
    return render_template("index.html", days=days, pagination=pagination)
1012467
private void addLeafDelta(Segment10 segment,
                            int pid, 
                            int nextPid,
                            int address,
                            int length)
  {
    Page10 page = _pageMap.get(pid);
    
    if (page != null && page.sequence() < segment.sequence()) {
      return;
    }
    
    if (page != null) {
      page.addDelta(address, length);
    }
  }
1296901
function launchAddInclude(evSrc) {

        var pageId = evSrc.getAttribute('data-target-page-id');
        var region = evSrc.getAttribute('data-target-region');
        
        window.parent.postMessage({
            name: 'add-include',
            pageId: pageId,
            regionName: region
        }, window.location.origin);
    }
1216593
def set_info_page(self):
        """"""
        if self.info_page is not None:
            self.infowidget.setHtml(
                self.info_page,
                QUrl.fromLocalFile(self.css_path)
            )
92536
def extract_data(self, page):
        """"""
        response_keys = set(page.keys())
        uncommon_keys = response_keys - self.common_keys

        for possible_data_key in uncommon_keys:
            element = page[possible_data_key]
            if isinstance(element, dict):
                return [self.representation(self.client, self.service_name,
                                            element)]
            if isinstance(element, list):
                return [self.representation(self.client, self.service_name, x)
                        for x in element]
656011
def populate_pages(self, parent=None, child=5, depth=5):
        """"""
        User = get_user_model()
        from basic_cms.models import Content
        author = User.objects.all()[0]
        if depth == 0:
            return
        p = self.model(parent=parent, author=author, status=self.model.PUBLISHED)
        p.save()
        p = self.get(id=p.id)
        Content(body='page-' + str(p.id), type='title', language=settings.PAGE_DEFAULT_LANGUAGE, page=p).save()
        Content(body='page-' + str(p.id), type='slug', language=settings.PAGE_DEFAULT_LANGUAGE, page=p).save()
        for child in range(1, child + 1):
            self.populate_pages(parent=p, child=child, depth=(depth - 1))
46288
def _set_lastpage(self):
        """"""
        self.last_page = (len(self._page_data) - 1) // self.screen.page_size
1088974
def add_data(self, addr, data):
        """"""
        data_len = len(data)
        if not addr == self._current_addr:
            logger.warning(
                'Address did not match when adding data to read request!')
            return

        # Add the data and calculate the next address to fetch
        self.data += data
        self._bytes_left -= data_len
        self._current_addr += data_len

        if self._bytes_left > 0:
            self._request_new_chunk()
            return False
        else:
            return True
1232914
def add_content(self, more_content):
        """"""
        sourcename = self.get_sourcename()

        if self.object.docs:
            self.add_line('', sourcename)
            for line in self.object.docs.splitlines():
                self.add_line(line, sourcename)

        # add additional content (e.g. from document), if present
        if more_content:
            self.add_line('', sourcename)
            for line, src in zip(more_content.data, more_content.items):
                self.add_line(line, src[0], src[1])
776153
def appendData(self, content):
		
		if self.pcdata is not None:
			self.pcdata += content
		else:
			self.pcdata = content
564474
public function addPage ()
    {
        add_submenu_page($this->parentSlug, $this->pageTitle, $this->menuTitle, $this->capability, $this->menuSlug, $this->getDisplayFunction());
    }
387200
def _update_page(self, uri, path):
        """"""
        if uri in self._pages:
            self._pages[uri].update()
        else:
            self._pages[uri] = Page(uri=uri, path=path)
993389
private void addDetailContent(CmsObject adminCms, Set<CmsResource> containerPages, String containerPage) {

        if (CmsDetailOnlyContainerUtil.isDetailContainersPage(adminCms, containerPage)) {

            try {
                CmsResource detailRes = adminCms.readResource(
                    CmsDetailOnlyContainerUtil.getDetailContentPath(containerPage),
                    CmsResourceFilter.IGNORE_EXPIRATION);
                containerPages.add(detailRes);
            } catch (Throwable e) {
                if (LOG.isWarnEnabled()) {
                    LOG.warn(e.getLocalizedMessage(), e);
                }
            }
        }
    }
819061
public void addDetailPageInfo(CmsDetailPageInfo info) {

        m_detailPageTable.add(info);
        m_allDetailPageInfos.put(info.getId(), info);
    }
1299389
def add(raw_item)
      item = raw_item.to_s
      fail "Item too large to fit." unless item.length < @body

      if (column = find_next_column)
        @page_data[column] << item
      else
        @page_data << [item]
      end

      adjust_configuration
    end