query stringlengths 7 6.41k | document stringlengths 12 28.8k | metadata dict | negatives listlengths 30 30 | negative_scores listlengths 30 30 | document_score stringlengths 5 10 | document_rank stringclasses 2
values |
|---|---|---|---|---|---|---|
Tells the technician to gather cuvettes and container | def gather_cuvettes items
show do
title "Gather Plastic Cuvettes"
check "Go to the shelf under the plate reader."
check "Gather #{items.length + 1} cuvettes."
check "Gather the following plastic cuvette container for easy containment."
image CUVETTE1
end
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def prepare_equipment\n show do\n title 'Gather materials'\n check 'Fill 2 buckets with ice.'\n check \"Get the 24-well aluminum block out of the 4 #{DEGREES_C}\" \\\n 'refrigerator and place it in one of the ice buckets.'\n check \"Set the refigera... | [
"0.5347925",
"0.5306996",
"0.51382",
"0.51010644",
"0.5067551",
"0.50209826",
"0.4989288",
"0.49826002",
"0.49822503",
"0.4971749",
"0.4916839",
"0.49070248",
"0.48873794",
"0.48808572",
"0.48648143",
"0.4859563",
"0.4848658",
"0.48400757",
"0.4828418",
"0.48237455",
"0.48136... | 0.6830738 | 0 |
Displays a media and culture volume table to the technician | def display_volume_table items, cult_vol, media_vol
volume_table = [["Cuvette Number", "Item ID", "Culture Volume to add (uL)", "#{MEDIA_TYPE} Media Volume to add (uL)"]]
first_row = ["0", "N/A", "0", "#{MAX_CUVETTE_VOLUME}"]
volume_table.push(first_row)
i = 1
items.each do |... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def load_media(outputPlate)\r\n show do \r\n title \"Filling new 96-deep well Item ##{outputPlate.id}\" \r\n \r\n note \"In a clean & sterile multichannel reservoir, pour aliquoted media.\" \r\n check \"Grab a new 96-deep well plate and label with the Item ID ##{outputPla... | [
"0.62774307",
"0.58968633",
"0.5835598",
"0.57037705",
"0.5629929",
"0.5598714",
"0.55381984",
"0.550582",
"0.5476128",
"0.5445302",
"0.5439968",
"0.53842765",
"0.53814846",
"0.53735614",
"0.537157",
"0.5363522",
"0.5358271",
"0.5344017",
"0.532738",
"0.5319164",
"0.5289043",... | 0.7502796 | 0 |
Tells the technician to go to the Seelig lab | def go_to_lab
show do
warning "Go to Seelig Lab in order to use the spectrophotometer."
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def link_to_enter_kase(kase=@kase)\n link_to_function(\"» \" + \"Start your case now!\".t, \"Luleka.Feedback.enter();\")\n end",
"def link_to_start_kase(kase=@kase)\n link_to_function(\"» \" + \"Add another case now!\".t, \"Luleka.Feedback.start();\")\n end",
"def go_to_where_you_belong\n \n en... | [
"0.6362451",
"0.63088685",
"0.60078055",
"0.5948975",
"0.58609724",
"0.5717786",
"0.5708525",
"0.5673596",
"0.56509256",
"0.5611166",
"0.5539933",
"0.5538683",
"0.55336875",
"0.5497547",
"0.5482689",
"0.5482463",
"0.5473321",
"0.54583555",
"0.5454913",
"0.545146",
"0.5450916"... | 0.6472867 | 0 |
Instructs the technician on how to use the spectrophotometer | def use_spectrophotometer
show do
title "Prepare Spectrophotometer"
note "On the Spectrophotometer laptop, if the program isn't open, click on nanodrop 2000."
image NANODROP_2000
note "Click on Cell Cultures."
note "Click on 'no' when prompted to load last workbook... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def go_to_lab\n show do\n warning \"Go to Seelig Lab in order to use the spectrophotometer.\"\n \n end\n end",
"def spec_intro\n show do\n title \"Spectrophotometer Measurements\"\n \n note \"This protocol will instruct you on how to take measurements on the S... | [
"0.61352223",
"0.608105",
"0.55957353",
"0.5574602",
"0.5536276",
"0.54829264",
"0.53858614",
"0.52825534",
"0.52675754",
"0.5256612",
"0.52466697",
"0.5211898",
"0.5199098",
"0.51900154",
"0.5186742",
"0.5156251",
"0.5155542",
"0.51492727",
"0.51249003",
"0.5123688",
"0.5117... | 0.74586654 | 0 |
Associates ODs to each overnight item | def associate_overnights items, dilution_factor, data_od
final_table = [["Cuvette", "Item", "Association Key", "OD"]]
time = Time.now
items.each_with_index do |item, index|
final_table_curr = []
#note "#{index}"
# note "#{data_od["OD#{index + 1}".to_sym]}"
measured_od =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add_supply_to_winter_holidays(holiday_hash, item)\n holiday_hash[:winter].each do |holiday, decorations|\n decorations.push(item)\n end\nend",
"def make_item_list\n @data = []\n @goods = {}\n @price = {}\n @shop_goods.each do |shopGood|\n next unless include?(shopGood)\n item = shopG... | [
"0.5707782",
"0.563166",
"0.55953854",
"0.55485934",
"0.54514027",
"0.5426244",
"0.54150677",
"0.53698105",
"0.5339964",
"0.5322047",
"0.5315012",
"0.52817434",
"0.5276035",
"0.5229796",
"0.5201454",
"0.52010185",
"0.5188031",
"0.5187729",
"0.51841015",
"0.5111928",
"0.504435... | 0.6756616 | 0 |
Adds all commits in the current repo to this CommitsFinder instance | def add_commits_in_current_repo
existing_branches.each do |branch_name|
add_commits_in_branch branch_name
end
@commit_list
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def commits\n if !@commits\n @commits = []\n x = 0\n loop do\n x += 1\n response = get(\"/commits/list/#{repo.owner.login}/#{repo.name}/#{name}?page=#{x}\")\n break unless response.code == 200\n @commits += response['commits'].map { |c| Commit.new(conne... | [
"0.6939698",
"0.6901467",
"0.67085433",
"0.65188676",
"0.6188714",
"0.6094908",
"0.5915683",
"0.5891663",
"0.5853037",
"0.58518344",
"0.5784506",
"0.57832175",
"0.57750595",
"0.5768564",
"0.57665014",
"0.57451797",
"0.5682057",
"0.56790423",
"0.56734544",
"0.56616926",
"0.565... | 0.74408567 | 0 |
Creates a new instance. +global_events_prefix+ must be a String or Symbol; it will be prepended to the name of every event fired. You can pass the empty string if you want. The block passed to this constructor is evaluated in the context of this object; this is how we build our DSL. | def initialize(options = { }, &block)
@global_events_prefix = nil
@versions = { }
options.assert_valid_keys(:global_events_prefix, :definition_text)
global_events_prefix options[:global_events_prefix] if options[:global_events_prefix]
@source_description = "passed-in data/bloc... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def initialize(&block)\n @triggers = []\n self.instance_eval(&block)\n end",
"def initialize(&block)\n\t\t\t@events = {}\n\t\t\t@rules = []\n\t\t\t@otherwise = nil\n\n\t\t\t@logger = Logger.new($stderr)\n\n\t\t\tif block_given?\n\t\t\t\tinstance_eval &block\n\t\t\tend\n\t\tend",
"def initial... | [
"0.59060895",
"0.5793593",
"0.5590223",
"0.55626804",
"0.55271375",
"0.55271375",
"0.54972017",
"0.5473161",
"0.5421618",
"0.5412921",
"0.5388802",
"0.5385997",
"0.53639525",
"0.5345864",
"0.5286282",
"0.52710867",
"0.52701175",
"0.52701175",
"0.52377605",
"0.52057606",
"0.51... | 0.68716526 | 0 |
Sets the +global_events_prefix+ the string that will be prepended (with the version) to every single event fired through this DefinitionSet. | def global_events_prefix(prefix = nil)
if prefix
@global_events_prefix = prefix.to_s
else
@global_events_prefix
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def prefix\n \"#{definition_set.global_events_prefix}#{number}_\"\n end",
"def meta_events_prefix_attribute(name)\n \"#{MetaEvents::Helpers.meta_events_javascript_tracking_prefix}_#{name}\"\n end",
"def global_prefix\n self.class.global_prefix\n end",
"def update_global_common... | [
"0.7518944",
"0.6338",
"0.60005957",
"0.5497252",
"0.51283187",
"0.49233925",
"0.47645733",
"0.47041208",
"0.46760696",
"0.46733555",
"0.46698838",
"0.46643505",
"0.46475384",
"0.46406993",
"0.46273828",
"0.45955813",
"0.4585237",
"0.4583166",
"0.4578242",
"0.45713758",
"0.45... | 0.783377 | 0 |
Declares a new version. The +number+ is required and must be unique. For +introduced+ and +options+, see the constructor of ::MetaEvents::Definition::Version. The block passed is evaluated in the context of the new Version; this is how we build our DSL. | def version(number, introduced, options = { }, &block)
version = ::MetaEvents::Definition::Version.new(self, number, introduced, options, &block)
raise "There is already a version #{version.number.inspect}" if @versions[version.number]
@versions[version.number] = version
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def initialize(definition_set, number, introduced, options = { }, &block)\n raise ArgumentError, \"You must pass a DefinitionSet, not #{definition_set.inspect}\" unless definition_set.kind_of?(::MetaEvents::Definition::DefinitionSet)\n raise ArgumentError, \"You must pass a version, not #{number.insp... | [
"0.6435655",
"0.6204255",
"0.6189336",
"0.61768526",
"0.6064401",
"0.60435945",
"0.6038024",
"0.60116905",
"0.5981671",
"0.5954718",
"0.57676524",
"0.5738179",
"0.56493986",
"0.5633315",
"0.56288",
"0.5600345",
"0.5590655",
"0.5590655",
"0.5590655",
"0.5590655",
"0.5590655",
... | 0.83208656 | 0 |
Returns the Version object for the given number, or raises an exception if there is none. | def fetch_version(number)
@versions[number] || raise(ArgumentError, "No such version #{number.inspect}; I have: #{@versions.keys.sort_by(&:to_s).inspect}")
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_version(number)\n version = versions_dataset.where(:version_number => number).first\n raise NoSuchVersionError if version.nil?\n version\n end",
"def version_number_to_version(version_or_version_number)\n unless version_or_version_number.is_a?(self.class.version... | [
"0.782619",
"0.734407",
"0.6942691",
"0.6896996",
"0.6639698",
"0.6457211",
"0.6457211",
"0.6420219",
"0.64082384",
"0.61373544",
"0.6131419",
"0.60775524",
"0.6057073",
"0.59839606",
"0.5976117",
"0.5971734",
"0.59146833",
"0.5912428",
"0.59067404",
"0.58965546",
"0.58839214... | 0.8200539 | 0 |
Fetches an ::MetaEvents::Definition::Event object directly, by version number, category, and event. | def fetch_event(version_num, category_name, event_name)
fetch_version(version_num).fetch_event(category_name, event_name)
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_event( event_category, event_id )\n event = get_deep_value( @events, event_category, event_id )\n if not event\n event = get_event_from_site( event_category, event_id )\n return nil if not event\n set_deep_value( @events, event, event_category, event_id )\n end\n event\nend",
"def event(even... | [
"0.6857853",
"0.6564164",
"0.63954765",
"0.6324582",
"0.6284527",
"0.6202798",
"0.61565113",
"0.6136646",
"0.6136646",
"0.6113422",
"0.6113422",
"0.60614127",
"0.59489226",
"0.58770967",
"0.5831538",
"0.58090085",
"0.58086944",
"0.58046824",
"0.57707137",
"0.57704663",
"0.576... | 0.715446 | 0 |
GET /contratacions/1 GET /contratacions/1.xml | def show
@contratacion = Contratacion.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.xml { render :xml => @contratacion }
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def show\n @contrato = Contrato.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @contrato }\n end\n end",
"def show\n @contratosinterventoria = Contratosinterventoria.find(params[:id])\n\n respond_to do |format|\n format.htm... | [
"0.6915011",
"0.6746515",
"0.6656993",
"0.65763044",
"0.6521597",
"0.6471331",
"0.64300257",
"0.639929",
"0.6390954",
"0.6390198",
"0.6385696",
"0.6284118",
"0.6206528",
"0.618778",
"0.6175329",
"0.6164507",
"0.61590683",
"0.6156754",
"0.61516696",
"0.6136464",
"0.6134217",
... | 0.73821115 | 0 |
GET /contratacions/new GET /contratacions/new.xml | def new
@contratacion = Contratacion.new
respond_to do |format|
format.html # new.html.erb
format.xml { render :xml => @contratacion }
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def new\n @contrato = Contrato.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @contrato }\n end\n end",
"def new\n @conseq = Conseq.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @conseq }\... | [
"0.77363694",
"0.7517263",
"0.7458412",
"0.7384362",
"0.7380936",
"0.72780794",
"0.71978307",
"0.71976995",
"0.7140766",
"0.71183455",
"0.71108997",
"0.7107357",
"0.71068674",
"0.7106586",
"0.7105831",
"0.7099368",
"0.7095794",
"0.70831686",
"0.7073926",
"0.70692027",
"0.7060... | 0.7894253 | 0 |
POST /contratacions POST /contratacions.xml | def create
@contratacion = Contratacion.new(params[:contratacion])
respond_to do |format|
if @contratacion.save
flash[:notice] = 'Contratacion was successfully created.'
format.html { redirect_to(@contratacion) }
format.xml { render :xml => @contratacion, :status => :created, :lo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create\n @contrat = Contrat.new(contrat_params)\n\n respond_to do |format|\n if @contrat.save\n format.html { redirect_to @contrat, notice: 'Contrat was successfully created.' }\n format.json { render :show, status: :created, location: @contrat }\n else\n format.html { rend... | [
"0.6498667",
"0.6397784",
"0.62582594",
"0.6195748",
"0.61828864",
"0.6067901",
"0.6046887",
"0.59861135",
"0.5946701",
"0.594121",
"0.5903012",
"0.58965975",
"0.58859354",
"0.5859936",
"0.5859743",
"0.5854303",
"0.58493507",
"0.5842538",
"0.5839561",
"0.58274895",
"0.5826974... | 0.695721 | 0 |
PUT /contratacions/1 PUT /contratacions/1.xml | def update
@contratacion = Contratacion.find(params[:id])
respond_to do |format|
if @contratacion.update_attributes(params[:contratacion])
flash[:notice] = 'Contratacion was successfully updated.'
format.html { redirect_to(@contratacion) }
format.xml { head :ok }
else
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def update\n @contrato = Contrato.find(params[:id])\n\n respond_to do |format|\n if @contrato.update_attributes(params[:contrato])\n format.html { redirect_to(@contrato, :notice => 'Contrato was successfully updated.') }\n format.xml { head :ok }\n else\n format.html { render ... | [
"0.6332397",
"0.61568034",
"0.6076194",
"0.60337615",
"0.595967",
"0.59105885",
"0.581045",
"0.5764228",
"0.57570624",
"0.5749625",
"0.57138175",
"0.57125807",
"0.5703004",
"0.56967604",
"0.56822026",
"0.5674798",
"0.5668178",
"0.56654173",
"0.56644017",
"0.5649987",
"0.56454... | 0.6732459 | 0 |
DELETE /contratacions/1 DELETE /contratacions/1.xml | def destroy
@contratacion = Contratacion.find(params[:id])
@contratacion.destroy
respond_to do |format|
format.html { redirect_to(contratacions_url) }
format.xml { head :ok }
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def destroy\n @contrato = Contrato.find(params[:id])\n @contrato.destroy\n\n respond_to do |format|\n format.html { redirect_to(contratos_url) }\n format.xml { head :ok }\n end\n end",
"def destroy\n @conseq = Conseq.find(params[:id])\n @conseq.destroy\n\n respond_to do |format|\... | [
"0.70601517",
"0.675164",
"0.6738928",
"0.67233413",
"0.66453093",
"0.6637601",
"0.66081774",
"0.6594569",
"0.65941375",
"0.65934974",
"0.6590393",
"0.6581055",
"0.657385",
"0.6535694",
"0.6491508",
"0.6461797",
"0.64562666",
"0.64513654",
"0.6451114",
"0.6449729",
"0.6447297... | 0.7205338 | 0 |
render the chart to html by creating an image object and placing the correct URL to the google charts api | def render
labels = []
values = []
@data.each do |label, value|
labels << CGI::escape(label)
values << (value > 0 ? value * 100 / @max : value).round.to_s
end
params = {:cht => 'p', :chs => "#{width}x#{height}", :chd => "t:#{values.join(',')}", :chl => labels.join('|') }
params['chco... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getchart()\n # The data for the chart\n data = [100, 125, 260, 147, 67]\n labels = [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\"]\n\n # Create a XYChart object of size 200 x 180 pixels\n c = ChartDirector::XYChart.new(200, 180)\n\n # Set the plot area at (30, 10) and of... | [
"0.6529826",
"0.63973385",
"0.6380158",
"0.63087684",
"0.63025284",
"0.6298178",
"0.62564313",
"0.6253392",
"0.62487185",
"0.62381625",
"0.62310493",
"0.62178165",
"0.6151344",
"0.6148036",
"0.6130985",
"0.6054432",
"0.5983396",
"0.5964054",
"0.59633815",
"0.5955059",
"0.5917... | 0.78121704 | 0 |
lexicase tournaments: start with a "tournament" of variants being compared; select the "objectives" (in this case, individual absolute errors) in a random order for each objective in turn, discard all individuals with worse than median performance; return a random one of those (assuming more than one might remain) | def lexicase_tournament_winner(tournament,objective_names, quantile=0.5)
objective_names.shuffle!
tournament.shuffle!
objective_names.each do |criterion|
break if tournament.length <= 1
extremes = tournament.collect {|dude| dude.abs_errors[criterion]}.minmax
median = (extremes[1]-extremes[0])*quantile... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def select(verbose)\n gen = 0\n parent = Phrase.random(@goal.length)\n until parent == @goal\n litter = @width.times.map { parent.reproduce(@p) }\n parent = litter.min_by { |p| p.mean_sqr_err(@goal) }\n gen += 1\n if verbose\n mse = parent.mean_sqr_err(@goal)\n puts \"#{p... | [
"0.583595",
"0.5788752",
"0.56276256",
"0.54988873",
"0.543677",
"0.53037196",
"0.52070147",
"0.520255",
"0.52002865",
"0.51816773",
"0.5181555",
"0.5155363",
"0.50922847",
"0.5085697",
"0.50836724",
"0.5083229",
"0.50727177",
"0.5059751",
"0.50518435",
"0.5046876",
"0.504687... | 0.77132857 | 0 |
Need a receipt like this: Output 1: 1 book : 12.49 1 music CD: 16.49 1 chocolate bar: 0.85 Sales Taxes: 1.50 Total: 29.83 | def format_receipt
receipt = ''
@items.each do |item|
receipt += item.generate_receipt_string
receipt += "\n"
end
sales_taxes = 0.00
@items.each do |item|
sales_taxes += item.total_tax
end
total = 0.00
@items.each do |item|
total += i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def receipt_builder\n header = \"Item Price\\n\"\n divider = \"---- -----\\n\"\n line_items = \"\"\n @basket.keys.each do |key|\n line_items += line_item_builder(key)\n end\n end_divider = \"---------------------... | [
"0.7135241",
"0.7028574",
"0.6989918",
"0.6812521",
"0.68063647",
"0.6621687",
"0.65158373",
"0.6278323",
"0.62015367",
"0.6172454",
"0.613715",
"0.61232543",
"0.6029458",
"0.60169464",
"0.59960306",
"0.59843254",
"0.59763056",
"0.59609956",
"0.5938226",
"0.5918366",
"0.59183... | 0.7452163 | 0 |
return a string of the item in final receipt format ex: 1 chocolate bar: 0.85 | def generate_receipt_string
"#{@quantity} #{type}: #{sprintf("%.2f",total_price)}"
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def to_s\n item_text = \"=== Your Receipt ===#{Constants::CR_LF}\"\n @item_list.each { |item| item_text += item.to_s }\n item_text += \"Sales taxes: #{(\"%.02f\" % @receipt_tax).to_s}#{Constants::CR_LF}\"\n item_text += \"Total: #{(\"%.02f\" % @receipt_total).to_s}\"\n end",
"def format_receipt\... | [
"0.78702974",
"0.74152184",
"0.7352088",
"0.69933754",
"0.6762355",
"0.6757104",
"0.6755129",
"0.6736307",
"0.6613854",
"0.6578233",
"0.6452231",
"0.6426097",
"0.63630366",
"0.63546723",
"0.63423467",
"0.6326346",
"0.62976635",
"0.62943107",
"0.6266452",
"0.6242589",
"0.62292... | 0.756796 | 1 |
Returns whether the template should be applied after the conversion of the tree. Defaults to true. | def apply_template_after?; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def templated?\n @templated\n end",
"def templated?\n !template.nil?\n end",
"def use_template_by_default\n @use_template_by_default || false\n end",
"def template_changed?\n modified?(\"design/template.slim\") || modified?(\".clayoven/hidden\") ||\n modified?(\".clayoven/tz\"... | [
"0.6450257",
"0.62794304",
"0.62175274",
"0.60698265",
"0.6022321",
"0.601194",
"0.5951496",
"0.57602787",
"0.573149",
"0.55625665",
"0.55612904",
"0.5549431",
"0.54469216",
"0.54406005",
"0.5439621",
"0.5314669",
"0.52541554",
"0.5252994",
"0.51992553",
"0.5195374",
"0.51185... | 0.6903159 | 0 |
Returns whether the template should be applied before the conversion of the tree. Defaults to false. | def apply_template_before?; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def use_template_by_default\n @use_template_by_default || false\n end",
"def templated?\n @templated\n end",
"def templated?\n !template.nil?\n end",
"def tpl_boolean; @original; end",
"def template() false end",
"def template?\n return false if source_file.nil?\n !:... | [
"0.66906506",
"0.6532053",
"0.64841485",
"0.6287468",
"0.61245334",
"0.6025118",
"0.59974426",
"0.5964482",
"0.5927913",
"0.5896238",
"0.58461535",
"0.58379966",
"0.5639981",
"0.5614962",
"0.5564929",
"0.55199456",
"0.5508471",
"0.5492453",
"0.53992176",
"0.53591067",
"0.5343... | 0.6857841 | 0 |
The basic version of the ID generator, without any special provisions for empty or unique IDs. source://kramdown//lib/kramdown/converter/base.rb237 | def basic_generate_id(str); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def id_generator; end",
"def generate_id()\n return nil unless @name and @represents\n @id ||= Digest::SHA1.hexdigest(@name + @represents)[0..5].force_encoding('utf-8').to_s\n end",
"def generate_id(str); end",
"def generate_id \n end",
"def id\n @id ||= \"%x-%s\" % [ Time.now.to... | [
"0.7572295",
"0.7451839",
"0.7393206",
"0.7269415",
"0.7063701",
"0.70474267",
"0.70063925",
"0.6981365",
"0.69771",
"0.69286007",
"0.6918649",
"0.68791157",
"0.6877778",
"0.68729013",
"0.6854895",
"0.68166107",
"0.68030244",
"0.6798119",
"0.6763248",
"0.6756432",
"0.67437387... | 0.77857196 | 0 |
See extract_code_language Warning: This version will modify the given attributes if a language is present. source://kramdown//lib/kramdown/converter/base.rb183 | def extract_code_language!(attr); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def extract_code_language(attr); end",
"def detect_lang_in_codeblock_attributes(pre_html_attrs, code_html_attrs); end",
"def set_translated_attributes(language_code, attributes)\n \n translation.update_terms(language_code, attributes)\n \n end",
"def set_translated_attributes(la... | [
"0.8172599",
"0.71718454",
"0.6351342",
"0.62694526",
"0.6217178",
"0.6180098",
"0.6152838",
"0.6152838",
"0.61411667",
"0.60992193",
"0.6081778",
"0.6007433",
"0.5956004",
"0.58831924",
"0.58498615",
"0.58311343",
"0.58311343",
"0.5709384",
"0.5709384",
"0.57001287",
"0.5698... | 0.8512406 | 0 |
Format the given math element with the math engine configured through the option 'math_engine'. source://kramdown//lib/kramdown/converter/base.rb206 | def format_math(el, opts = T.unsafe(nil)); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def convert_math(el, indent)\n\t\t\"`#{el.value}`\"\n\tend",
"def parse_inline_math; end",
"def math(s)\n convert(\"$$#{s}$$\", mime: 'text/latex')\n end",
"def change_math_delims(text)\n re = Regexp.new(\"(<span\\\\ class=\\\"math\\\\-tex\\\\-or\\\\-mml\\\">\\\\\\\\\\\\()(.+)(\\\\\\\\\\\\)</span>... | [
"0.73104453",
"0.68500465",
"0.6776767",
"0.65560806",
"0.64970016",
"0.6473832",
"0.596858",
"0.59428287",
"0.5937426",
"0.58380383",
"0.56014985",
"0.5492892",
"0.54802495",
"0.53916156",
"0.53803873",
"0.5313551",
"0.5269253",
"0.5230379",
"0.522823",
"0.51807886",
"0.5176... | 0.742089 | 0 |
Generate an unique alphanumeric ID from the the string +str+ for use as a header ID. Uses the option +auto_id_prefix+: the value of this option is prepended to every generated ID. source://kramdown//lib/kramdown/converter/base.rb222 | def generate_id(str); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def basic_generate_id(str); end",
"def generate_id\n if @document.attributes.has_key? 'sectids'\n sep = @document.attributes['idseparator'] || '_'\n pre = @document.attributes['idprefix'] || '_'\n base_id = %(#{pre}#{title.downcase.gsub(REGEXP[:illegal_sectid_chars], sep).tr_s(sep, sep).chomp(s... | [
"0.75597197",
"0.646882",
"0.64625776",
"0.64321226",
"0.6249097",
"0.61701417",
"0.6155841",
"0.61555606",
"0.6110151",
"0.603282",
"0.5926566",
"0.59055895",
"0.58706284",
"0.584957",
"0.58249867",
"0.5822976",
"0.58154",
"0.5805992",
"0.5766605",
"0.5762371",
"0.57401246",... | 0.7787825 | 0 |
Highlight the given +text+ in the language +lang+ with the syntax highlighter configured through the option 'syntax_highlighter'. source://kramdown//lib/kramdown/converter/base.rb192 | def highlight_code(text, lang, type, opts = T.unsafe(nil)); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def highlight_by_language(text, language)\n ::CodeRay.scan(text, language).html(:line_numbers => :inline, :wrap => :span)\n end",
"def highlight(code, lang, options = T.unsafe(nil)); end",
"def highlight(code, lang, options = T.unsafe(nil), format = T.unsafe(nil)); end",
"def highlight(text, ... | [
"0.7091793",
"0.7061371",
"0.6999793",
"0.67019504",
"0.6626611",
"0.65688604",
"0.6448766",
"0.6448064",
"0.62407887",
"0.61922026",
"0.6180517",
"0.60866994",
"0.60458505",
"0.5994504",
"0.58897597",
"0.58828783",
"0.58662856",
"0.5840123",
"0.5829951",
"0.58252",
"0.582054... | 0.7096436 | 0 |
Return +true+ if the header element +el+ should be used for the table of contents (as specified by the +toc_levels+ option). | def in_toc?(el); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def has_headings?\n not headings.empty?\n end",
"def heading?(level = nil)\n parent?(Tree::Heading, level: level)\n end",
"def show_toc?\n headings.many?\n end",
"def node_header?(node)\n %w[h1 h2 h3 h4 h5 h6].include?(node.name.downcase)\n end",
"def table_heade... | [
"0.64306366",
"0.64265925",
"0.64079183",
"0.63838387",
"0.6382986",
"0.6279396",
"0.6252777",
"0.6172751",
"0.5969604",
"0.59344226",
"0.5878978",
"0.5878978",
"0.58225834",
"0.57607",
"0.57591695",
"0.57591695",
"0.5757825",
"0.5662633",
"0.56169736",
"0.55422926",
"0.53991... | 0.6828335 | 0 |
Return the output header level given a level. Uses the +header_offset+ option for adjusting the header level. source://kramdown//lib/kramdown/converter/base.rb169 | def output_header_level(level); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def header_level\n @pairs.fetch(\"level\", \"1\").to_i\n end",
"def header_level\n if self.type != :header\n raise NodeError, \"can't get header_level for non-header\"\n end\n CMark.node_get_header_level(@pointer)\n end",
"def header_level=(level)\n if self.type !=... | [
"0.7158847",
"0.67288524",
"0.65343326",
"0.63158053",
"0.5959466",
"0.5890195",
"0.5789099",
"0.5745547",
"0.57417417",
"0.5732551",
"0.5603357",
"0.55694616",
"0.554882",
"0.55438995",
"0.5494811",
"0.5457608",
"0.5439446",
"0.53970295",
"0.53529763",
"0.5239012",
"0.523607... | 0.77659065 | 0 |
Return the entity that represents the given smart_quote element. source://kramdown//lib/kramdown/converter/base.rb248 | def smart_quote_entity(el); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def convert_smart_quote(el)\r\n t = case el.value\r\n when :lsquo\r\n \"\\u2018\"\r\n when :rsquo\r\n \"\\u2019\"\r\n when :ldquo\r\n \"\\u201C\"\r\n when :rdquo\r\n \"\\u201D\"\r\n end\r\n #puts \"smartquote sub #... | [
"0.60496604",
"0.60276544",
"0.58904296",
"0.5828818",
"0.58240414",
"0.57439816",
"0.56473386",
"0.561432",
"0.55014056",
"0.5479365",
"0.5471874",
"0.54610234",
"0.5397134",
"0.53877133",
"0.53730947",
"0.5356337",
"0.53356105",
"0.5321377",
"0.53128994",
"0.5283612",
"0.52... | 0.71036404 | 0 |
Convert the element tree +tree+ and return the resulting conversion object (normally a string) and an array with warning messages. The parameter +options+ specifies the conversion options that should be used. Initializes a new instance of the calling class and then calls the convert method with +tree+ as parameter. If ... | def convert(tree, options = T.unsafe(nil)); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def render( template, options )\n return template.call( options ) if template.is_a? Proc\n return render_proc.call( template, options ) if template\n \"<p class='warning'>Could not find a matching renderer for node #{options[:node]}<br />Args: #{options.inspect}</p>\"\n end",
"def determine_tem... | [
"0.56059885",
"0.545352",
"0.5404506",
"0.53085166",
"0.5254277",
"0.52313614",
"0.5085441",
"0.5001185",
"0.49011496",
"0.481891",
"0.4713914",
"0.4658586",
"0.4646639",
"0.46147984",
"0.46133766",
"0.45987985",
"0.45703775",
"0.45689008",
"0.45486152",
"0.45376083",
"0.4537... | 0.63276464 | 0 |
Return the template specified by +template+. source://kramdown//lib/kramdown/converter/base.rb139 | def get_template(template); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_template(template)\n xapi.VM.get_by_name_label(template).first\n end",
"def get_template(template)\n xapi.VM.get_by_name_label(template).first\n end",
"def template(template = nil)\n $template ||= template\n $template || '{{id}} {{name}}'\n end",
"def template(template_na... | [
"0.7334172",
"0.7334172",
"0.73081005",
"0.7221326",
"0.7194457",
"0.7147386",
"0.71322364",
"0.71303004",
"0.70672643",
"0.70634747",
"0.70377254",
"0.6933534",
"0.6930595",
"0.6840485",
"0.6823456",
"0.6761894",
"0.6731197",
"0.67189205",
"0.6714572",
"0.670809",
"0.6701617... | 0.82663137 | 0 |
Add the syntax highlighter name to the 'class' attribute of the given attribute hash. And overwrites or add a "languageLANG" part using the +lang+ parameter if +lang+ is not nil. source://kramdown//lib/kramdown/converter/html.rb409 | def add_syntax_highlighter_to_class_attr(attr, lang = T.unsafe(nil)); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def highlight(code, lang, options = T.unsafe(nil)); end",
"def highlight_code(text, lang, type, opts = T.unsafe(nil)); end",
"def highlight(code, lang, options = T.unsafe(nil), format = T.unsafe(nil)); end",
"def tml_lang_attribute_tag(lang = tml_current_language)\n return \"lang='en'\" if Tml.config.di... | [
"0.5778036",
"0.5698843",
"0.5684591",
"0.5563001",
"0.55380744",
"0.54686576",
"0.5438913",
"0.5380031",
"0.5347208",
"0.5192995",
"0.5150769",
"0.5144133",
"0.51430476",
"0.51099724",
"0.5099546",
"0.50599384",
"0.5052381",
"0.5052381",
"0.50424695",
"0.50344557",
"0.503289... | 0.7834779 | 0 |
Helper method used by +convert_p+ to convert a paragraph that only contains a single :img element. source://kramdown//lib/kramdown/converter/html.rb99 | def convert_standalone_image(el, indent); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_image_desc(page_doc)\n\treturn page_doc.css('//body/p')[-2].inner_html\nend",
"def description_image\n parsed_description.css('img').first # there's only one\n end",
"def convert_img(el, opts)\n alt_text = el.attr['alt'].to_s#.gsub(ESCAPED_CHAR_RE) { $1 ? \"\\\\#{$1}\" : $2 }\n sr... | [
"0.59877795",
"0.5919807",
"0.5858627",
"0.57585454",
"0.57539016",
"0.56155694",
"0.56084967",
"0.5530909",
"0.5500746",
"0.54725844",
"0.546731",
"0.5450568",
"0.5433514",
"0.5400141",
"0.5394783",
"0.53931934",
"0.5382436",
"0.53759056",
"0.5368475",
"0.5365067",
"0.533706... | 0.6122799 | 0 |
Fixes the elements for use in a TOC entry. source://kramdown//lib/kramdown/converter/html.rb453 | def fix_for_toc_entry(elements); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def preproccess_toc(cfg, err_box)\n if ! cfg['have_nav'] \n return\n end\n # parse the toc root doc.\n @menu_list = []\n @img_hash = {} # it is possible that a nav doc has images\n if cfg['nested'] \n Dir.chdir(cfg['doc_home']) { |p|\n f = \"#{p}/#{cfg['toc']['root']}\"\n ... | [
"0.61147445",
"0.6070567",
"0.6025664",
"0.59418184",
"0.5939429",
"0.5870195",
"0.57240933",
"0.5711272",
"0.5690065",
"0.5667679",
"0.56209636",
"0.56058604",
"0.55681014",
"0.55530405",
"0.5549631",
"0.55447435",
"0.54302484",
"0.5426773",
"0.5385559",
"0.5367893",
"0.5366... | 0.8132139 | 0 |
Format the given element as block HTML. source://kramdown//lib/kramdown/converter/html.rb397 | def format_as_block_html(name, attr, body, indent); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def format_as_indented_block_html(name, attr, body, indent); end",
"def format_as_span_html(name, attr, body); end",
"def parse_block_html; end",
"def display_as_html(content, &block)\n content = content.presence || \"\"\n if content !~ /<\\w+[^>]>/\n content = content.gsub(\"\\n\", \"<br />\")\n ... | [
"0.667955",
"0.65978885",
"0.6363737",
"0.6363063",
"0.6363063",
"0.6194627",
"0.60985994",
"0.60479355",
"0.6032451",
"0.6024452",
"0.5981717",
"0.5939378",
"0.5924948",
"0.5911547",
"0.5883956",
"0.58620304",
"0.58559555",
"0.58385384",
"0.5837119",
"0.5821703",
"0.58062375... | 0.7474612 | 0 |
Format the given element as block HTML with a newline after the start tag and indentation before the end tag. source://kramdown//lib/kramdown/converter/html.rb403 | def format_as_indented_block_html(name, attr, body, indent); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def format_as_block_html(name, attr, body, indent); end",
"def format_as_span_html(name, attr, body); end",
"def simple_format(text, options={})\n t = options.delete(:tag) || :p\n start_tag = tag(t, options, true)\n text = escape_html(text.to_s.dup) unless text.html_safe?\n text.gsu... | [
"0.76359373",
"0.6299702",
"0.6009535",
"0.59825885",
"0.58988136",
"0.5873316",
"0.5857941",
"0.584363",
"0.58376104",
"0.578911",
"0.5770384",
"0.57588464",
"0.5742499",
"0.57275736",
"0.572173",
"0.5716018",
"0.5715281",
"0.5689671",
"0.565727",
"0.5654819",
"0.5649968",
... | 0.7648524 | 0 |
Format the given element as span HTML. source://kramdown//lib/kramdown/converter/html.rb392 | def format_as_span_html(name, attr, body); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def html_span(*args, &block)\n html_tag(:span, *args, &block)\n end",
"def simple_format_span(text, html_options={}, options={})\n text = '' if text.nil?\n text = text.dup\n start_tag = tag('span', html_options, true)\n text = sanitize(text) unless options[:sanitize] == false\n text = text.to_... | [
"0.70749354",
"0.6885304",
"0.66959393",
"0.6522323",
"0.65127695",
"0.6485085",
"0.64108783",
"0.62518865",
"0.62303525",
"0.61505985",
"0.6109507",
"0.59479266",
"0.59341973",
"0.5895143",
"0.5861504",
"0.58522284",
"0.584973",
"0.584973",
"0.5822825",
"0.5730737",
"0.56845... | 0.77942246 | 0 |
Remove all footnotes from the given elements. source://kramdown//lib/kramdown/converter/html.rb468 | def remove_footnotes(elements); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def figure_footnote_cleanup(xmldoc)\n nomatches = false\n until nomatches\n q = \"//figure/following-sibling::*[1][self::p and *[1][self::fn]]\"\n nomatches = true\n xmldoc.xpath(q).each do |s|\n next if s.children.map { |c| c.text? && /[[:alpha:]]/.match(c.text)... | [
"0.66883576",
"0.6316892",
"0.62743455",
"0.62184405",
"0.6096982",
"0.6041952",
"0.6039644",
"0.60078394",
"0.5995355",
"0.5913121",
"0.5789026",
"0.57865304",
"0.5773083",
"0.57725334",
"0.57616496",
"0.5759114",
"0.5734211",
"0.57217515",
"0.56926244",
"0.56729126",
"0.565... | 0.8207496 | 0 |
Remove all link elements by unwrapping them. source://kramdown//lib/kramdown/converter/html.rb460 | def unwrap_links(elements); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def unlink!\n parse \n @tags.each do |tag|\n @doc.xpath(\"//a[ends_with(@href,'#{tag}')]\", EndsWithFilter.new).each do |element|\n element.swap(element.children)\n end\n end\n output = @doc.xpath(\"/#{@wrap_tag}/body/p\").inner_html\n output = @doc.xpath(\"/#{@wra... | [
"0.7737277",
"0.76921856",
"0.76921856",
"0.76921856",
"0.7317164",
"0.707127",
"0.68090415",
"0.64917177",
"0.637147",
"0.62733674",
"0.62726355",
"0.62342685",
"0.62008023",
"0.61843413",
"0.6166893",
"0.61534816",
"0.6118932",
"0.610675",
"0.60155576",
"0.60155576",
"0.601... | 0.78001726 | 0 |
Return the IAL containing the attributes of the element +el+. source://kramdown//lib/kramdown/converter/kramdown.rb419 | def ial_for_element(el); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def attribute_list(el); end",
"def element\n \"Attribute\"\n end",
"def dom_attribute(name); end",
"def attributes\n @element_map\n end",
"def html_attributes(attr); end",
"def html_attributes\n {:xmlns => 'http://www.w3.org/1999/xhtml', 'xml:lang' => 'en', :lang => 'en'}\n end",
... | [
"0.6780326",
"0.60337216",
"0.6026899",
"0.5997523",
"0.59545016",
"0.58675224",
"0.58675224",
"0.58396983",
"0.5790134",
"0.5753787",
"0.57232845",
"0.56758535",
"0.5650624",
"0.56473035",
"0.56277585",
"0.5553643",
"0.55085576",
"0.54550153",
"0.54263264",
"0.54263264",
"0.... | 0.7337862 | 0 |
Helper method used by +convert_p+ to convert a paragraph that only contains a single :img element. source://kramdown//lib/kramdown/converter/latex.rb80 | def convert_standalone_image(el, _opts, img); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def convert_standalone_image(el, indent); end",
"def convert_img(el, opts)\n alt_text = el.attr['alt'].to_s#.gsub(ESCAPED_CHAR_RE) { $1 ? \"\\\\#{$1}\" : $2 }\n src = el.attr['src'].to_s\n if src.empty?\n \"![#{alt_text}]()\"\n else\n title = parse_title(el.attr['tit... | [
"0.6295412",
"0.5754958",
"0.5550891",
"0.55395085",
"0.551942",
"0.5517926",
"0.5502047",
"0.5367767",
"0.52931947",
"0.5273636",
"0.522963",
"0.5227878",
"0.52210796",
"0.5210897",
"0.5207554",
"0.5186183",
"0.5159632",
"0.51369363",
"0.51260316",
"0.51213074",
"0.5111899",... | 0.58910286 | 1 |
Wrap the +text+ inside a LaTeX environment of type +type+. The element +el+ is passed on to the method attribute_list the resulting string is appended to both the \\begin and the \\end lines of the LaTeX environment for easier postprocessing of LaTeX environments. source://kramdown//lib/kramdown/converter/latex.rb582 | def latex_environment(type, el, text); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def initialize( text, type = :plain )\n @type = type\n @text = text\n super wrap\n end",
"def html_markup_textile(text); end",
"def value_helper_text(type, text)\n value_el = Ox::Element.new(:value)\n value_el['xsi:type'] = type\n value_el << text\n value_el\n end",
"... | [
"0.5512882",
"0.54977864",
"0.539388",
"0.5386892",
"0.5308426",
"0.524303",
"0.517361",
"0.51679903",
"0.5107711",
"0.50927794",
"0.5090696",
"0.5054726",
"0.49970844",
"0.4952275",
"0.494744",
"0.49363235",
"0.4932997",
"0.4919833",
"0.49167123",
"0.49143222",
"0.4891043",
... | 0.76469713 | 0 |
Return a string containing a valid \hypertarget command if the element has an ID defined, or +nil+ otherwise. If the parameter +add_label+ is +true+, a \label command will also be used additionally to the \hypertarget command. source://kramdown//lib/kramdown/converter/latex.rb590 | def latex_link_target(el, add_label = T.unsafe(nil)); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def label_with_id(label_id, options = {})\r\n if options && options[:index] then\r\n label(:id => label_id.to_s, :index => options[:index]).text\r\n else\r\n label(:id, label_id.to_s).text\r\n end\r\n end",
"def label_with_id\n text_and_id( :label )\n end",
"def label_with_i... | [
"0.6204203",
"0.6176065",
"0.6176065",
"0.6176065",
"0.58404845",
"0.5703717",
"0.56196785",
"0.55914825",
"0.55014867",
"0.54848653",
"0.545617",
"0.5413723",
"0.5408106",
"0.5384043",
"0.53004116",
"0.5293275",
"0.52900994",
"0.5268377",
"0.52619976",
"0.52579504",
"0.52258... | 0.6533116 | 0 |
Normalize the abbreviation key so that it only contains allowed ASCII character source://kramdown//lib/kramdown/converter/latex.rb575 | def normalize_abbreviation_key(key); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def key_replace\n /[^a-z0-9?]+/\n end",
"def canonize (key)\n key.tr(\"A-Z\",\"a-z\").gsub(/\\s/,\"\")\nend",
"def sanitize_key key\n key.gsub! '-', '_'\n key.gsub! ' ', ''\n key.gsub! ',', ''\n key.downcase!\n return key\n end",
"def normalize(key, hsh)\n hsh[key].gsub!... | [
"0.65988857",
"0.6582656",
"0.65368104",
"0.6399902",
"0.6382445",
"0.63640136",
"0.6327021",
"0.6309852",
"0.62930703",
"0.621917",
"0.6176466",
"0.614066",
"0.6111957",
"0.6077411",
"0.6056376",
"0.6033638",
"0.598908",
"0.5988038",
"0.5986267",
"0.596566",
"0.5961062",
"... | 0.7709006 | 0 |
Converts the given String +data+ into a Symbol or +nil+ with the following provisions: A leading colon is stripped from the string. An empty value or a value equal to "nil" results in +nil+. source://kramdown//lib/kramdown/options.rb122 | def str_to_sym(data); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def preprocess_data data\n if data[0] == \"'\" || data[0] == '\"'\n \"say \" + data[1,data.length]\n else\n data\n end\n end",
"def parse_symbol_in_arg\n tk = get_tk\n if :on_symbol == tk[:kind] then\n tk[:text].sub(/^:/, '')\n elsif :on_tstring == tk[:kind... | [
"0.56324583",
"0.5618774",
"0.55152595",
"0.5434989",
"0.53362405",
"0.5317004",
"0.531092",
"0.5098866",
"0.5098866",
"0.5098866",
"0.5098866",
"0.507795",
"0.5065454",
"0.50462705",
"0.50432384",
"0.500799",
"0.49865356",
"0.49853468",
"0.4940162",
"0.4935447",
"0.49243027"... | 0.6455017 | 0 |
This helper method adds the given +text+ either to the last element in the +tree+ if it is a +type+ element or creates a new text element with the given +type+. source://kramdown//lib/kramdown/parser/base.rb103 | def add_text(text, tree = T.unsafe(nil), type = T.unsafe(nil)); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add_text_child(text)\n text_tag = Tag.new(\"text\", text)\n @current_node.children.push text_tag\n text_tag.parent = @current_node\n # text_tag.depth = @current_node.depth\n end",
"def add_node(p_node_text, p_node_type, p_parent_node = nil, p_node_color = nil)\n new_node = create_node(p_nod... | [
"0.6637571",
"0.6477978",
"0.6308902",
"0.6291994",
"0.6214225",
"0.6033628",
"0.5991373",
"0.5890548",
"0.58757097",
"0.58479035",
"0.580323",
"0.57863575",
"0.5746819",
"0.5746819",
"0.564649",
"0.56059563",
"0.56010425",
"0.5600923",
"0.5588673",
"0.55686253",
"0.5543612",... | 0.76406574 | 0 |
Extract the part of the StringScanner +strscan+ backed string specified by the +range+. This method works correctly under Ruby 1.8 and Ruby 1.9. source://kramdown//lib/kramdown/parser/base.rb115 | def extract_string(range, strscan); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_range(str)\n ends = str.split(':')\n if ends.empty?\n nil\n elsif ends.length < 2\n (ends[0].to_i..ends[0].to_i)\n else\n (ends[0].to_i..ends[1].to_i)\n end\nend",
"def text_range\n body = get.gsub!(/\\s*/,'')\n pattern = /#{@before_element}.*#{@after_element}/\n results = ... | [
"0.5831819",
"0.57662547",
"0.5757642",
"0.5754341",
"0.57485217",
"0.5733431",
"0.5695956",
"0.56617725",
"0.56203055",
"0.5596705",
"0.55856955",
"0.5546629",
"0.5544335",
"0.55308354",
"0.5487497",
"0.54654384",
"0.5463229",
"0.54604596",
"0.54562366",
"0.54470277",
"0.538... | 0.87683344 | 0 |
Handle the raw HTML tag at the current position. source://kramdown//lib/kramdown/parser/html.rb127 | def handle_raw_html_tag(name); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_raw_html(el, &block); end",
"def block_html(raw)\n raw = unindent(raw)\n\n if md = raw.match(/\\<(.+?)\\>(.*)\\<(\\/.+?)\\>/m)\n open_tag, content, close_tag = md.captures\n \"<#{open_tag}>\\n#{recursive_render(unindent(content))}<#{close_tag}>\"\n else\n ... | [
"0.70914817",
"0.6701702",
"0.65441436",
"0.6156276",
"0.611873",
"0.60374826",
"0.5972163",
"0.59674764",
"0.5935505",
"0.59248006",
"0.59154576",
"0.59061843",
"0.58907133",
"0.5837709",
"0.582649",
"0.58259404",
"0.58133966",
"0.58055377",
"0.57702637",
"0.57543504",
"0.57... | 0.78124267 | 0 |
Parses the given string for HTML attributes and returns the resulting hash. If the optional +line+ parameter is supplied, it is used in warning messages. If the optional +in_html_tag+ parameter is set to +false+, attributes are not modified to contain only lowercase letters. source://kramdown//lib/kramdown/parser/html.... | def parse_html_attributes(str, line = T.unsafe(nil), in_html_tag = T.unsafe(nil)); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def link_attributes(tag)\n Hash[$1.scan(/(\\w+)=\"([^\"]*)\"/)] if tag =~ link_regex\n end",
"def html_attributes(attr); end",
"def extract_attributes(line)\n title = clean(detokenize(strip_tags(line), TOKEN))\n\n if line =~ /<a href=\"(.*)\">/\n product_url = $1;\n end\n\n { :title => tit... | [
"0.6078092",
"0.60056543",
"0.5804856",
"0.57454234",
"0.5698655",
"0.5607583",
"0.5407363",
"0.5382623",
"0.5349697",
"0.53067243",
"0.52425706",
"0.52237076",
"0.51983833",
"0.51983833",
"0.5192557",
"0.51596725",
"0.51283246",
"0.51280516",
"0.5114937",
"0.5077795",
"0.505... | 0.7986314 | 0 |
Parse raw HTML from the current source position, storing the found elements in +el+. Parsing continues until one of the following criteria are fulfilled: The end of the document is reached. The matching end tag for the element +el+ is found (only used if +el+ is an HTML element). When an HTML start tag is found, proces... | def parse_raw_html(el, &block); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_block_html; end",
"def block_html(raw)\n raw = unindent(raw)\n\n if md = raw.match(/\\<(.+?)\\>(.*)\\<(\\/.+?)\\>/m)\n open_tag, content, close_tag = md.captures\n \"<#{open_tag}>\\n#{recursive_render(unindent(content))}<#{close_tag}>\"\n else\n raw\n ... | [
"0.61030155",
"0.60056704",
"0.56785536",
"0.55268675",
"0.54984236",
"0.53659034",
"0.53188497",
"0.53152514",
"0.531519",
"0.5305001",
"0.52917284",
"0.5272353",
"0.52426463",
"0.5236436",
"0.5236436",
"0.5221233",
"0.52124256",
"0.5199443",
"0.5082338",
"0.50755316",
"0.50... | 0.75429183 | 0 |
Return +true+ if we are before a block boundary. | def before_block_boundary?; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def after?(prev_block)\n (index - prev_block.index) == 1 && prev_block.time <= time && prev_block.hash == prev_hash\n end",
"def is_before?(step_nr)\n return flow.flow_step_is_before?(current_step:step, other_step:step_nr)\n end",
"def before?\n !before.nil?\n end",
"def ends_before_it_be... | [
"0.63333344",
"0.62253684",
"0.6099005",
"0.6098038",
"0.6078456",
"0.5994548",
"0.5982615",
"0.59679025",
"0.5944332",
"0.58997726",
"0.58729994",
"0.58711576",
"0.5807674",
"0.5757214",
"0.5746848",
"0.57321185",
"0.57173294",
"0.57018816",
"0.5699278",
"0.56974494",
"0.567... | 0.6615387 | 0 |
Correct abbreviation attributes. source://kramdown//lib/kramdown/parser/kramdown/abbreviation.rb34 | def correct_abbreviations_attributes; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cardinal_abbreviation; end",
"def abbreviation; end",
"def abbreviation; end",
"def abbreviation; end",
"def abbreviation; end",
"def abbreviation\n @data['abbreviation']\n end",
"def normalize_abbreviation_key(key); end",
"def parse_abbrev_definition; end",
"def bootstrap_a... | [
"0.7198332",
"0.7123314",
"0.7123314",
"0.7123314",
"0.7123314",
"0.6951385",
"0.67679316",
"0.6735424",
"0.66944987",
"0.6335657",
"0.6335657",
"0.6335657",
"0.6335657",
"0.6272408",
"0.6247368",
"0.62158674",
"0.6182453",
"0.6161043",
"0.61011267",
"0.6059049",
"0.60418177"... | 0.8447248 | 0 |
Normalize the link identifier. source://kramdown//lib/kramdown/parser/kramdown/link.rb17 | def normalize_link_id(id); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def normalize_uri\r\n self.link = Addressable::URI.heuristic_parse(self.link).normalize!.to_s if self.link\r\n end",
"def normalize_links!\n # TODO: normalize Array of Symbol, String, DM::Property 1-jump-away or DM::Query::Path\n end",
"def id_from_link(node)\n node.attribute('href').value.spl... | [
"0.6845072",
"0.6608968",
"0.6462473",
"0.6362826",
"0.6283061",
"0.6246474",
"0.6232641",
"0.6232641",
"0.62288547",
"0.61504346",
"0.6099085",
"0.6093239",
"0.6053305",
"0.6053305",
"0.6053305",
"0.6053305",
"0.6049298",
"0.5973689",
"0.59611523",
"0.5934576",
"0.5909074",
... | 0.7861021 | 0 |
Parse the link definition at the current location. source://kramdown//lib/kramdown/parser/kramdown/abbreviation.rb17 | def parse_abbrev_definition; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_link_definition; end",
"def parse_link_definition\n return false if @src[3].to_s =~ /[ \\t]+[\"']/\n @src.pos += @src.matched_size\n link_id, link_url, link_title = normalize_link_id(@src[1]), @src[2] || @src[3], @src[5]\n if @link_defs[link_id]\n warning(\"Duplicat... | [
"0.765054",
"0.677565",
"0.64058757",
"0.60404253",
"0.56330615",
"0.55106676",
"0.54839027",
"0.5478588",
"0.5463519",
"0.54325294",
"0.536833",
"0.5285873",
"0.52480394",
"0.5237037",
"0.5230646",
"0.5195982",
"0.5190438",
"0.5173297",
"0.5115908",
"0.5109978",
"0.5080794",... | 0.69506395 | 1 |
Parse the string +str+ and extract all attributes and add all found attributes to the hash +opts+. source://kramdown//lib/kramdown/parser/kramdown/extensions.rb18 | def parse_attribute_list(str, opts); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def apply_attributes(string)\n string.gsub ATTRIBUTE_REGEXP do |match|\n key, value = match.match(ATTRIBUTE_REGEXP).to_a[1..2]\n self[key] = value\n ''\n end\n end",
"def parse_attributes(attributes_string, options = {})\n options = { only: [], except: [] }.merge(opti... | [
"0.65832704",
"0.63308376",
"0.6320848",
"0.60499835",
"0.57427186",
"0.5716623",
"0.57040536",
"0.5681631",
"0.5648843",
"0.56312174",
"0.54815495",
"0.5446649",
"0.5366608",
"0.53385335",
"0.53296185",
"0.53225183",
"0.52490956",
"0.5228439",
"0.5219231",
"0.5216689",
"0.52... | 0.6883847 | 0 |
Parse the Atx header at the current location. source://kramdown//lib/kramdown/parser/kramdown/header.rb32 | def parse_atx_header; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_header_contents; end",
"def parse_atx_header\n return false unless after_block_boundary?\n text, id = parse_header_contents\n text.sub!(/(?<!\\\\)#+\\z/, '') && text.rstrip!\n return false if text.empty?\n add_header(@src[\"level\"].length, text, id)\n true\n ... | [
"0.71607167",
"0.6889543",
"0.6681591",
"0.6403561",
"0.6359519",
"0.62512296",
"0.61393034",
"0.6052759",
"0.60486597",
"0.5972703",
"0.58744365",
"0.58623517",
"0.5848344",
"0.5835556",
"0.57895744",
"0.57565606",
"0.5749613",
"0.57131845",
"0.5700847",
"0.5684955",
"0.5679... | 0.7471661 | 0 |
Parse the autolink at the current location. source://kramdown//lib/kramdown/parser/kramdown/autolink.rb19 | def parse_autolink; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_link; end",
"def parse_link_definition; end",
"def inline_auto_link(text)\n text.gsub!(AUTO_LINK_RE) do\n all, leading, proto, url, post = $&, $1, $2, $3, $6\n if leading =~ /<a\\s/i || leading =~ /![<>=]?/\n # don't replace URL's that are already linked\n ... | [
"0.6835412",
"0.64092875",
"0.6035176",
"0.59421396",
"0.5915866",
"0.5909133",
"0.58049506",
"0.56566274",
"0.56358594",
"0.56250614",
"0.5616259",
"0.556889",
"0.5542511",
"0.55327433",
"0.55154884",
"0.549861",
"0.5493865",
"0.54865336",
"0.5471837",
"0.545275",
"0.5418013... | 0.8315904 | 0 |
Parse the blank line at the current postition. source://kramdown//lib/kramdown/parser/kramdown/blank_line.rb17 | def parse_blank_line; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def empty_line\n end",
"def accept_blank_line(blank_line)\n # @res << annotate(\"<p />\") << \"\\n\"\n end",
"def _EmptyLine\n\n _save = self.pos\n while true # sequence\n _tmp = scan(/\\G(?-mix:^)/)\n unless _tmp\n self.pos = _save\n break\n end\n _tmp = apply(:_... | [
"0.70874816",
"0.6844527",
"0.67994934",
"0.6783497",
"0.6709496",
"0.6374825",
"0.6361678",
"0.628914",
"0.62779796",
"0.62656045",
"0.61623496",
"0.6108091",
"0.6092255",
"0.6079135",
"0.60430294",
"0.5907197",
"0.59062254",
"0.58754456",
"0.58754456",
"0.58754456",
"0.5875... | 0.84985083 | 0 |
Parse one of the block extensions (ALD, block IAL or generic extension) at the current location. source://kramdown//lib/kramdown/parser/kramdown/extensions.rb164 | def parse_block_extensions; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_block_extensions\n # Parse the string +str+ and extract the annotation or the list of tests\n if @src.scan(RESPECTESTS_START)\n last_child = @tree.children.last\n if last_child.type == :header\n parse_respec_tests_list(@src[1], last_child.options[:respec_section... | [
"0.73780054",
"0.62135637",
"0.5778399",
"0.5582272",
"0.5571859",
"0.5431129",
"0.5289876",
"0.528795",
"0.52835196",
"0.5211491",
"0.52070946",
"0.516311",
"0.5150442",
"0.5116026",
"0.5075573",
"0.5066713",
"0.50035244",
"0.4995105",
"0.49949858",
"0.49826765",
"0.49649224... | 0.7985939 | 0 |
Parse the HTML at the current position as blocklevel HTML. source://kramdown//lib/kramdown/parser/kramdown/html.rb71 | def parse_block_html; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_codeblocks(html); end",
"def parse_raw_html(el, &block); end",
"def parse_markup\n @html = PARSER.parse(@markup, :base_heading_level => 1)\n end",
"def block_html(raw)\n raw = unindent(raw)\n\n if md = raw.match(/\\<(.+?)\\>(.*)\\<(\\/.+?)\\>/m)\n open_tag, content, c... | [
"0.6969937",
"0.6884349",
"0.67965883",
"0.6722922",
"0.661233",
"0.6388799",
"0.6235057",
"0.6153317",
"0.6139314",
"0.600892",
"0.5978829",
"0.58926344",
"0.58728915",
"0.58647394",
"0.5786427",
"0.5774369",
"0.5772996",
"0.5746835",
"0.57329094",
"0.57081",
"0.5698972",
... | 0.7820359 | 0 |
Parse the math block at the current location. source://kramdown//lib/kramdown/parser/kramdown/math.rb19 | def parse_block_math; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_inline_math; end",
"def expr()\n\n\n begin\n @ruleStack.push('expr')\n # dice.g:52:7: ( mult ( '+' mult | '-' mult )* )\n # dice.g:52:7: mult ( '+' mult | '-' mult )*\n\n #@following.push(FOLLOW_mult_in_expr65)\n mult()\n #@follow... | [
"0.719033",
"0.59808606",
"0.59661883",
"0.59013015",
"0.5859415",
"0.5779881",
"0.57509184",
"0.5729493",
"0.5539392",
"0.5531612",
"0.5527482",
"0.55015796",
"0.5491937",
"0.5473938",
"0.5412877",
"0.5301235",
"0.5290539",
"0.52525127",
"0.52467704",
"0.5239392",
"0.5235624... | 0.80768406 | 0 |
Parse the blockquote at the current location. source://kramdown//lib/kramdown/parser/kramdown/blockquote.rb21 | def parse_blockquote; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_quote(quote)\n update_action_log(:spans, !quote.spans.to_a.empty?)\n\n quote_author = quote.spans[1].small\n update_action_log(:small, !quote_author.nil? && quote_author.present?)\n\n tags = quote.div.links.map(&:text) # a.k.a { |tag| tag.text }\n update_action_log(:div, !quote.div.nil? &&... | [
"0.62646246",
"0.6056526",
"0.6047581",
"0.6010404",
"0.5933974",
"0.5749717",
"0.5609517",
"0.55305576",
"0.5485327",
"0.5485327",
"0.5303003",
"0.51972306",
"0.5144143",
"0.51400745",
"0.5134379",
"0.50487137",
"0.50296474",
"0.49431422",
"0.49223807",
"0.49050364",
"0.4863... | 0.81379753 | 0 |
Parse the indented codeblock at the current location. source://kramdown//lib/kramdown/parser/kramdown/codeblock.rb23 | def parse_codeblock; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_codeblock_fenced; end",
"def parse_codeblocks(html); end",
"def indent ( c )\n return @parser.parse( c )\n end",
"def parse_codeblock_fenced\n if @src.check(self.class::FENCED_CODEBLOCK_MATCH)\n start_line_number = @src.current_line_number\n @src.pos += @src.matched... | [
"0.69948226",
"0.66526735",
"0.64120924",
"0.6317767",
"0.62638295",
"0.62291735",
"0.6136482",
"0.6117424",
"0.608143",
"0.5995318",
"0.5963925",
"0.5955586",
"0.5942867",
"0.5929439",
"0.5919349",
"0.5903321",
"0.5898596",
"0.5895738",
"0.5882427",
"0.5865338",
"0.5865338",... | 0.69193774 | 1 |
Parse the fenced codeblock at the current location. source://kramdown//lib/kramdown/parser/kramdown/codeblock.rb37 | def parse_codeblock_fenced; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_codeblock_fenced\n if @src.check(self.class::FENCED_CODEBLOCK_MATCH)\n start_line_number = @src.current_line_number\n @src.pos += @src.matched_size\n el = new_block_el(:codeblock, @src[5], nil, :location => start_line_number, :raw_text => @src.matched.dup)\n lan... | [
"0.8096643",
"0.6818646",
"0.6757348",
"0.65740573",
"0.64965534",
"0.6380531",
"0.6298306",
"0.622848",
"0.61928153",
"0.6172938",
"0.6158236",
"0.6000057",
"0.59896666",
"0.5939783",
"0.5912883",
"0.58954984",
"0.58918035",
"0.5855386",
"0.58360416",
"0.5818743",
"0.577772"... | 0.83670837 | 0 |
Parse the codespan at the current scanner location. source://kramdown//lib/kramdown/parser/kramdown/codespan.rb17 | def parse_codespan; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_codespan\n start_line_number = @src.current_line_number\n result = @src.scan(CODESPAN_DELIMITER)\n simple = (result.length == 1)\n saved_pos = @src.save_pos\n\n if simple && @src.pre_match =~ /\\s\\Z|\\A\\Z/ && @src.match?(/\\s/)\n add_text(result)\n r... | [
"0.79288065",
"0.6274362",
"0.6189541",
"0.5982753",
"0.5925648",
"0.5925648",
"0.5925648",
"0.5835322",
"0.57941943",
"0.57342327",
"0.57177776",
"0.571069",
"0.56306547",
"0.56232816",
"0.5598721",
"0.55450124",
"0.5513854",
"0.5495716",
"0.5467712",
"0.54368436",
"0.543658... | 0.82892764 | 0 |
Parse the emphasis at the current location. source://kramdown//lib/kramdown/parser/kramdown/emphasis.rb17 | def parse_emphasis; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_emphasis\n start_line_number = @src.current_line_number\n saved_pos = @src.save_pos\n\n result = @src.scan(EMPHASIS_START)\n element = (result.length == 2 ? :strong : :em)\n type = result[0..0]\n\n if (type == '_' && @src.pre_match =~ /[[:alpha:]]-?[[:alpha:]]*\\... | [
"0.77757674",
"0.6824109",
"0.66992366",
"0.5791289",
"0.56402457",
"0.5467281",
"0.5356916",
"0.53200835",
"0.5228832",
"0.5214762",
"0.5164814",
"0.51500434",
"0.51500434",
"0.51499355",
"0.5040179",
"0.5033825",
"0.5033825",
"0.5033825",
"0.49491227",
"0.47688735",
"0.4768... | 0.7502131 | 1 |
Parse the EOB marker at the current location. source://kramdown//lib/kramdown/parser/kramdown/eob.rb17 | def parse_eob_marker; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_footnote_marker; end",
"def _EofComment\n\n _save = self.pos\n while true # sequence\n _tmp = apply(:__hyphen_)\n unless _tmp\n self.pos = _save\n break\n end\n _tmp = match_string(\"//\")\n unless _tmp\n self.pos = _save\n break\n end\n ... | [
"0.6182849",
"0.5319643",
"0.5262582",
"0.52574784",
"0.51690763",
"0.50767803",
"0.4962288",
"0.49215597",
"0.49184674",
"0.48634762",
"0.4859095",
"0.48406175",
"0.48193237",
"0.4809787",
"0.47867265",
"0.47793794",
"0.47774667",
"0.47699708",
"0.47584063",
"0.47584063",
"0... | 0.8127071 | 0 |
Parse the backslashescaped character at the current location. source://kramdown//lib/kramdown/parser/kramdown/escaped_chars.rb17 | def parse_escaped_chars; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_escaped_chars\n @src.pos += @src.matched_size\n add_text(@src[1])\n end",
"def decode_char(input)\n input.mark\n first = input.next\n # check first char\n if first.nil?\n input.reset\n return nil\n end\n # if... | [
"0.6672552",
"0.59889215",
"0.59684664",
"0.5767187",
"0.5685158",
"0.5684541",
"0.56499904",
"0.5605103",
"0.5570718",
"0.5517027",
"0.5485448",
"0.5481853",
"0.5479066",
"0.54644006",
"0.54644006",
"0.54644006",
"0.54198146",
"0.54198146",
"0.54198146",
"0.54079205",
"0.538... | 0.6809283 | 0 |
Parse the generic extension at the current point. The parameter +type+ can either be :block or :span depending whether we parse a block or span extension tag. source://kramdown//lib/kramdown/parser/kramdown/extensions.rb54 | def parse_extension_start_tag(type); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_block_extensions; end",
"def parser_type_for_extension(extension); end",
"def parse_span_extensions; end",
"def parse_block_extensions\n # Parse the string +str+ and extract the annotation or the list of tests\n if @src.scan(RESPECTESTS_START)\n last_child = @tree.children.la... | [
"0.6563688",
"0.63935405",
"0.62183195",
"0.619709",
"0.5896283",
"0.5824023",
"0.5824023",
"0.56921405",
"0.5609098",
"0.5498357",
"0.54521006",
"0.5297364",
"0.5297364",
"0.5201513",
"0.52009475",
"0.51945025",
"0.5183002",
"0.51822776",
"0.51413757",
"0.50676304",
"0.50544... | 0.76427054 | 0 |
Used for parsing the first line of a list item or a definition, i.e. the line with list item marker or the definition marker. source://kramdown//lib/kramdown/parser/kramdown/list.rb32 | def parse_first_list_line(indentation, content); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def accept_list_item_start list_item\n case @list_type.last\n when :NOTE, :LABEL then\n Array(list_item.label).map do |label|\n tt_sections label\n end.flatten\n end\n end",
"def accept_list_item_start list_item\n type = @list_type.last\n\n case type\n when :NOTE, :LABEL then\... | [
"0.6993943",
"0.68070966",
"0.67507964",
"0.6686852",
"0.66158205",
"0.6582903",
"0.6507093",
"0.6507093",
"0.6507093",
"0.6507093",
"0.6507093",
"0.6507093",
"0.6507093",
"0.6507093",
"0.6507093",
"0.6507093",
"0.6401018",
"0.62152517",
"0.61974293",
"0.6179695",
"0.61714756... | 0.784473 | 0 |
Parse the foot note definition at the current location. source://kramdown//lib/kramdown/parser/kramdown/footnote.rb21 | def parse_footnote_definition; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_footnote_marker; end",
"def get_footnotes\n @doc.elements.each(\"ROOT/footnotes/footnote\") do |footnote|\n number = footnote.attributes[@footnote_id_name]\n text = footnote.text\n footnote = Footnote.create(number: number, dataset_id: @dataset_id, text: text)\n end\n end",
"def... | [
"0.76552176",
"0.6936307",
"0.65894014",
"0.6565632",
"0.6463102",
"0.6356311",
"0.6242753",
"0.61758953",
"0.6052577",
"0.6045039",
"0.6032677",
"0.5928418",
"0.58649355",
"0.5781494",
"0.57555014",
"0.57342625",
"0.5723461",
"0.563325",
"0.5621671",
"0.5613723",
"0.54856515... | 0.8339174 | 0 |
Parse the footnote marker at the current location. source://kramdown//lib/kramdown/parser/kramdown/footnote.rb40 | def parse_footnote_marker; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_footnote_definition; end",
"def get_footnotes\n @doc.elements.each(\"ROOT/footnotes/footnote\") do |footnote|\n number = footnote.attributes[@footnote_id_name]\n text = footnote.text\n footnote = Footnote.create(number: number, dataset_id: @dataset_id, text: text)\n end\n end",
... | [
"0.77084255",
"0.68294597",
"0.6531936",
"0.6527225",
"0.6322559",
"0.6197362",
"0.61563563",
"0.603791",
"0.5918423",
"0.590783",
"0.5882572",
"0.58295774",
"0.57941586",
"0.5708633",
"0.5597786",
"0.55936897",
"0.55921316",
"0.55813426",
"0.5570381",
"0.5446996",
"0.5409536... | 0.85039896 | 0 |
Parse the horizontal rule at the current location. source://kramdown//lib/kramdown/parser/kramdown/horizontal_rule.rb17 | def parse_horizontal_rule; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_horizontal_rule\n start_line_number = @src.current_line_number\n @src.pos += @src.matched_size\n @tree.children << new_block_el(:hr, nil, nil, location: start_line_number)\n true\n end",
"def horizontal_traversal_step(horizontal_cursor=@horizontal_cursor)\n @min_... | [
"0.79855937",
"0.61232996",
"0.56089973",
"0.54360026",
"0.53784746",
"0.529709",
"0.52823573",
"0.5267987",
"0.51939017",
"0.5049223",
"0.5031013",
"0.4951519",
"0.495008",
"0.49356657",
"0.48969138",
"0.48834947",
"0.48772013",
"0.4875722",
"0.4875722",
"0.4875722",
"0.4875... | 0.8263697 | 0 |
Parse the HTML entity at the current location. source://kramdown//lib/kramdown/parser/kramdown/html_entity.rb17 | def parse_html_entity; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_span_html; end",
"def parse_markup\n @html = PARSER.parse(@markup, :base_heading_level => 1)\n end",
"def parse_html\n return nil_elem if @word.line.match(TRANSLATED)\n return nil_elem if @word.tail.join(\" \")[/^{{.*}}$/]\n\n body = @word.tail.join(\" \")\n body, tagged_with_equa... | [
"0.56842697",
"0.56842196",
"0.56397605",
"0.54667485",
"0.545085",
"0.5352232",
"0.5316564",
"0.5301596",
"0.5294554",
"0.52556205",
"0.51361436",
"0.5094623",
"0.5026003",
"0.5025005",
"0.5017612",
"0.5011059",
"0.49933434",
"0.49609426",
"0.49431458",
"0.4942291",
"0.49152... | 0.7835049 | 0 |
Parse the inline math at the current location. source://kramdown//lib/kramdown/parser/kramdown/math.rb44 | def parse_inline_math; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_block_math; end",
"def cache_inline_math(output)\n output.gsub!(/(?:\\\\\\((.*?)\\\\\\)|([^\\\\]|^)\\$(.*?[^\\\\])\\$)/m) do\n math = \"\\\\( #{$1 || $3} \\\\)\"\n key = digest(math)\n literal_cache[key] = math\n $2.to_s + xmlelement('inline') { key }\n end\n en... | [
"0.7259052",
"0.6037903",
"0.5930563",
"0.59186333",
"0.583092",
"0.57488424",
"0.55862784",
"0.5561241",
"0.5515141",
"0.5505483",
"0.543881",
"0.5427668",
"0.5424296",
"0.5389778",
"0.5377916",
"0.53387153",
"0.53073096",
"0.52745515",
"0.5267721",
"0.5209181",
"0.51843655"... | 0.83763564 | 0 |
Parse the line break at the current location. source://kramdown//lib/kramdown/parser/kramdown/line_break.rb17 | def parse_line_break; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_line_break\n @tree.children << Element.new(:br, nil, nil, location: @src.current_line_number)\n @src.pos += @src.matched_size\n end",
"def parse_page_break\n start_line_number = @src.current_line_number\n @src.pos += @src.matched_size\n @tree.children << new_bloc... | [
"0.78439265",
"0.6875594",
"0.6070283",
"0.60431844",
"0.5932901",
"0.58567137",
"0.585139",
"0.5833542",
"0.58179325",
"0.57415384",
"0.5733968",
"0.57129526",
"0.57118696",
"0.5689091",
"0.5682198",
"0.5682198",
"0.5682198",
"0.5653045",
"0.56510067",
"0.5628257",
"0.562614... | 0.79908293 | 0 |
Parse the link at the current scanner position. This method is used to parse normal links as well as image links. source://kramdown//lib/kramdown/parser/kramdown/link.rb61 | def parse_link; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_link\n start_line_number = @src.current_line_number\n result = @src.scan(LINK_START)\n cur_pos = @src.pos\n saved_pos = @src.save_pos\n\n link_type = (result =~ /^!/ ? :img : :a)\n\n # no nested links allowed\n if link_type == :a && (@tree.type == :img || ... | [
"0.8304993",
"0.7167754",
"0.70325905",
"0.6633472",
"0.63770044",
"0.6311901",
"0.6198098",
"0.6135793",
"0.61002696",
"0.608899",
"0.60557735",
"0.6051282",
"0.6048608",
"0.60281587",
"0.60228086",
"0.5970481",
"0.5940255",
"0.5934067",
"0.58631885",
"0.58584017",
"0.583781... | 0.75305915 | 1 |
Parse the link definition at the current location. source://kramdown//lib/kramdown/parser/kramdown/link.rb24 | def parse_link_definition; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_link; end",
"def parse_link_definition\n return false if @src[3].to_s =~ /[ \\t]+[\"']/\n @src.pos += @src.matched_size\n link_id, link_url, link_title = normalize_link_id(@src[1]), @src[2] || @src[3], @src[5]\n if @link_defs[link_id]\n warning(\"Duplicate link ID '... | [
"0.73171645",
"0.72460026",
"0.7043915",
"0.6695131",
"0.66534805",
"0.6217534",
"0.6208666",
"0.6198842",
"0.6197074",
"0.61554605",
"0.6001659",
"0.59045184",
"0.5896718",
"0.5876106",
"0.58646816",
"0.58601445",
"0.5787533",
"0.5738023",
"0.5715561",
"0.56653714",
"0.56524... | 0.8361281 | 0 |
Parse the ordered or unordered list at the current location. source://kramdown//lib/kramdown/parser/kramdown/list.rb54 | def parse_list; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_nested_ordered_list_incorrect\n assert_nothing_raised do\n parser = Juli::Parser.new\n parser.parse(data_path('t005.txt'), Juli::Visitor::Tree.new)\n end\n end",
"def parse_first_list_line(indentation, content); end",
"def compile_dlist(list_tag, lexer)\n first = lexer.peek\n ... | [
"0.6659156",
"0.64526415",
"0.61135626",
"0.61117995",
"0.60907733",
"0.6077486",
"0.60115105",
"0.6005581",
"0.59915113",
"0.5926114",
"0.5921594",
"0.5896714",
"0.58676904",
"0.5837521",
"0.57735574",
"0.572758",
"0.57109606",
"0.56998324",
"0.5697611",
"0.56681305",
"0.562... | 0.7079554 | 0 |
Parse the paragraph at the current location. source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb31 | def parse_paragraph; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_paragraph_from(p_node)\n Elements::Containers::Paragraph.new(p_node, document_properties)\n end",
"def parse_paragraph_from(p_node)\n Elements::Containers::Paragraph.new(p_node, document_properties)\n end",
"def parse_paragraph document, par, env\n paragraph = Paragraph.new(par)\n\... | [
"0.71041834",
"0.71041834",
"0.701352",
"0.64579165",
"0.645575",
"0.64155143",
"0.63846236",
"0.63379693",
"0.63257605",
"0.6307668",
"0.6298632",
"0.6168038",
"0.6168038",
"0.6164372",
"0.60903704",
"0.6080461",
"0.6019093",
"0.59534866",
"0.5943435",
"0.58821464",
"0.58790... | 0.8236508 | 0 |
Parse the Setext header at the current location. source://kramdown//lib/kramdown/parser/kramdown/header.rb20 | def parse_setext_header; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_setext_header\n return false unless after_block_boundary?\n text, id = parse_header_contents\n return false if text.empty?\n add_header(@src[\"level\"] == '-' ? 2 : 1, text, id)\n true\n end",
"def parse_header_contents; end",
"def parse_atx_header; end",
"de... | [
"0.74222875",
"0.67830384",
"0.6369133",
"0.60487527",
"0.59781086",
"0.5947425",
"0.57437253",
"0.567708",
"0.5622621",
"0.55336404",
"0.5481402",
"0.5471004",
"0.5459231",
"0.5451053",
"0.54322547",
"0.53353137",
"0.53173006",
"0.5296801",
"0.5295877",
"0.52570975",
"0.5240... | 0.83381677 | 0 |
Parse the smart quotes at current location. source://kramdown//lib/kramdown/parser/kramdown/smart_quotes.rb158 | def parse_smart_quotes; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def scan_for_quote(token); end",
"def parse_blockquote; end",
"def _quoted_string\n\n _save = self.pos\n while true # sequence\n _tmp = match_string(\"\\\"\")\n unless _tmp\n self.pos = _save\n break\n end\n while true\n\n _save2 = self.pos\n while true # c... | [
"0.64167845",
"0.6249948",
"0.6169067",
"0.6154146",
"0.61173135",
"0.6093282",
"0.6049371",
"0.59312433",
"0.5802344",
"0.5799229",
"0.57477015",
"0.57218015",
"0.5706559",
"0.5704621",
"0.5700924",
"0.5673835",
"0.5589672",
"0.5584941",
"0.5574415",
"0.55347294",
"0.5533797... | 0.75772834 | 0 |
Parse the extension span at the current location. source://kramdown//lib/kramdown/parser/kramdown/extensions.rb192 | def parse_span_extensions; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_extension_start_tag(type); end",
"def parse_block_extensions; end",
"def parse_block_extensions\n # Parse the string +str+ and extract the annotation or the list of tests\n if @src.scan(RESPECTESTS_START)\n last_child = @tree.children.last\n if last_child.type == :head... | [
"0.6721527",
"0.60409385",
"0.5559759",
"0.55374295",
"0.5456321",
"0.5410479",
"0.5301454",
"0.5260435",
"0.5260435",
"0.5260435",
"0.5260435",
"0.52541757",
"0.51829946",
"0.5181194",
"0.5181194",
"0.512626",
"0.5125423",
"0.50896496",
"0.5065127",
"0.50504565",
"0.50116736... | 0.79699093 | 0 |
Parse the HTML at the current position as spanlevel HTML. source://kramdown//lib/kramdown/parser/kramdown/html.rb102 | def parse_span_html; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_markup\n @html = PARSER.parse(@markup, :base_heading_level => 1)\n end",
"def parse_block_html; end",
"def html_parser; end",
"def parse_raw_html(el, &block); end",
"def parse_codeblocks(html); end",
"def call\n result = Kramdown::Document.new(@text, self.class.options.deep_merge... | [
"0.67176235",
"0.6481122",
"0.6265569",
"0.60923517",
"0.6027352",
"0.5945492",
"0.5906587",
"0.5840803",
"0.58397377",
"0.57452166",
"0.5702525",
"0.5671963",
"0.5653703",
"0.5596691",
"0.55764043",
"0.55619836",
"0.553731",
"0.55329716",
"0.55261207",
"0.55159533",
"0.54792... | 0.74020153 | 0 |
Parse the table at the current location. source://kramdown//lib/kramdown/parser/kramdown/table.rb25 | def parse_table; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_table\n advance\n table = Element.new(:table)\n table = parse_attributes(table)\n table = parse_caption(table)\n while match?(:table_row, :table_header, :table_data)\n table = parse_row(table)\n end\n if match? :table_end\n advance\n else\n war... | [
"0.7211366",
"0.6862016",
"0.6836774",
"0.674538",
"0.65239525",
"0.6409875",
"0.6394557",
"0.61969656",
"0.61924845",
"0.61575407",
"0.6093232",
"0.59443283",
"0.593396",
"0.5777908",
"0.57430196",
"0.57192785",
"0.5704651",
"0.5699221",
"0.5650288",
"0.56255054",
"0.5609347... | 0.700971 | 1 |
Parse the typographic symbols at the current location. source://kramdown//lib/kramdown/parser/kramdown/typographic_symbol.rb22 | def parse_typographic_syms; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_typographic_syms\n start_line_number = @src.current_line_number\n @src.pos += @src.matched_size\n val = TYPOGRAPHIC_SYMS_SUBST[@src.matched]\n if val.kind_of?(Symbol)\n @tree.children << Element.new(:typographic_sym, val, nil, location: start_line_number)\n els... | [
"0.7935999",
"0.6130606",
"0.56828177",
"0.56120664",
"0.54815674",
"0.54815674",
"0.5330677",
"0.53099215",
"0.5179783",
"0.5155823",
"0.51490873",
"0.51472443",
"0.50729406",
"0.5049294",
"0.5013751",
"0.5006929",
"0.5001052",
"0.49863595",
"0.49505365",
"0.49440366",
"0.49... | 0.7620344 | 1 |
Update the +ial+ with the information from the inline attribute list +opts+. source://kramdown//lib/kramdown/parser/kramdown/extensions.rb41 | def update_ial_with_ial(ial, opts); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def update_attr_with_ial(attr, ial); end",
"def update_attr_with_ial(attr, ial)\n ial[:refs]&.each do |ref|\n update_attr_with_ial(attr, ref) if (ref = @alds[ref])\n end\n ial.each do |k, v|\n if k == IAL_CLASS_ATTR\n attr[k] = \"#{attr[k]} #{v}\".lstrip\n ... | [
"0.59828365",
"0.58421355",
"0.57923514",
"0.563561",
"0.55163187",
"0.5437187",
"0.5436022",
"0.5427942",
"0.5425878",
"0.5353924",
"0.5280967",
"0.5209181",
"0.52009976",
"0.5187638",
"0.51669115",
"0.5161553",
"0.5155789",
"0.5129009",
"0.51269245",
"0.51269245",
"0.512208... | 0.62757415 | 0 |
Parse all blocklevel elements in +text+ into the element +el+. source://kramdown//lib/kramdown/parser/kramdown.rb140 | def parse_blocks(el, text = T.unsafe(nil)); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_blocks(el, text = nil)\n @stack.push([@tree, @src, @block_ial])\n @tree, @block_ial = el, nil\n @src = (text.nil? ? @src : ::Kramdown::Utils::StringScanner.new(text, el.options[:location]))\n\n status = catch(:stop_block_parsing) do\n until @src.eos?\n @blo... | [
"0.68906385",
"0.6848",
"0.6032855",
"0.57952523",
"0.5707293",
"0.56591815",
"0.5485883",
"0.5482817",
"0.5425686",
"0.5405571",
"0.5404302",
"0.5397645",
"0.53926396",
"0.53734314",
"0.536851",
"0.5332989",
"0.5331171",
"0.52860403",
"0.52860403",
"0.5275463",
"0.5270416",
... | 0.740789 | 0 |
Create the needed span parser regexps. source://kramdown//lib/kramdown/parser/kramdown.rb134 | def span_parser_regexps(parsers = T.unsafe(nil)); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def span_parser_regexps(parsers = @span_parsers)\n span_start = /#{parsers.map {|name| @parsers[name].span_start }.join('|')}/\n [span_start, /(?=#{span_start})/]\n end",
"def parse_codespan\n start_line_number = @src.current_line_number\n result = @src.scan(CODESPAN_DELIMITER)\n... | [
"0.68919164",
"0.6258343",
"0.60895175",
"0.5921842",
"0.5907883",
"0.56552243",
"0.55564845",
"0.5498298",
"0.54697824",
"0.54697824",
"0.5339074",
"0.531856",
"0.5260347",
"0.52454287",
"0.52052534",
"0.5194234",
"0.5162921",
"0.5152975",
"0.51457196",
"0.5112847",
"0.51060... | 0.692547 | 0 |
Update the given attributes hash +attr+ with the information from the inline attribute list +ial+ and all referenced ALDs. source://kramdown//lib/kramdown/parser/kramdown.rb274 | def update_attr_with_ial(attr, ial); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def update_attr_with_ial(attr, ial)\n ial[:refs]&.each do |ref|\n update_attr_with_ial(attr, ref) if (ref = @alds[ref])\n end\n ial.each do |k, v|\n if k == IAL_CLASS_ATTR\n attr[k] = \"#{attr[k]} #{v}\".lstrip\n elsif k.kind_of?(String)\n attr[... | [
"0.7706744",
"0.6085903",
"0.5966376",
"0.5866782",
"0.58641976",
"0.57938147",
"0.57566535",
"0.5655157",
"0.5533049",
"0.553065",
"0.5502558",
"0.54647326",
"0.5461555",
"0.54130137",
"0.5398829",
"0.5397478",
"0.53868645",
"0.53790796",
"0.5365605",
"0.5346193",
"0.5310242... | 0.718555 | 1 |
Update the parser specific link definitions with the data from +link_defs+ (the value of the :link_defs option). The parameter +link_defs+ is a hash where the keys are possibly unnormalized link IDs and the values are two element arrays consisting of the link target and a title (can be +nil+). source://kramdown//lib/kr... | def update_link_definitions(link_defs); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def update_link_definitions(link_defs)\n link_defs.each {|k, v| @link_defs[normalize_link_id(k)] = v }\n end",
"def link_definitions(doc)\n logger.info(\"Finding and linking definitions\")\n\n terms = find_definitions(doc)\n add_terms_to_references(doc, terms)\n find_term_... | [
"0.8276248",
"0.63060534",
"0.6055455",
"0.6044364",
"0.5787355",
"0.56174845",
"0.5251201",
"0.5181234",
"0.5110846",
"0.5031978",
"0.49924645",
"0.49922845",
"0.49678078",
"0.49356312",
"0.49336246",
"0.49336246",
"0.49336246",
"0.49243698",
"0.49226686",
"0.48874024",
"0.4... | 0.8039762 | 1 |
precomputed patterns for indentations 1..4 and fallback expression to compute pattern when indentation is outside the 1..4 range. source://kramdown//lib/kramdown/parser/kramdown/list.rb258 | def fetch_pattern(type, indentation); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def indentation_pattern()\n return /^(?: \\t)+/\n end",
"def statement_list\n # -> uncomment the next line to manually enable rule tracing\n # trace_in( __method__, 4 )\n return_value = StatementListReturnValue.new\n\n # $rule.start = the first token seen before matching\n return_val... | [
"0.5810422",
"0.53488535",
"0.53345543",
"0.52019817",
"0.5117083",
"0.5103803",
"0.50303936",
"0.49724528",
"0.4817995",
"0.48163822",
"0.48001906",
"0.48001906",
"0.47988096",
"0.47911137",
"0.47843117",
"0.47590867",
"0.47452688",
"0.4728991",
"0.46975535",
"0.4688457",
"0... | 0.6081399 | 0 |
Return +true+ if there is a parser called +name+. | def has_parser?(name); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parser?\n ! @search_parser.nil?\n end",
"def parser?\n ! @search_parser.nil?\n end",
"def has_name?\n true\n end",
"def has_name?(name)\n names.include?(name)\n end",
"def knows?(name)\n false\n end",
"def name_exists?(name)\n return false unle... | [
"0.657376",
"0.657376",
"0.6557951",
"0.65026706",
"0.649503",
"0.6429391",
"0.6429391",
"0.6417024",
"0.63359773",
"0.6291985",
"0.6229088",
"0.62241733",
"0.61713403",
"0.61486393",
"0.61388063",
"0.6112215",
"0.6074178",
"0.60416883",
"0.60304743",
"0.602217",
"0.6007388",... | 0.80035424 | 0 |
Return the Data structure for the parser +name+. source://kramdown//lib/kramdown/parser/kramdown.rb334 | def parser(name = T.unsafe(nil)); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kramdown_parser(name)\n get_config_val(@kramdown_parsers, name)\n end",
"def structure(name)\n self.class.structure(name)\n end",
"def add_kramdown_parser(name, class_name)\n @kramdown_parsers[name.to_sym] = Object.const_get(class_name)\n end",
"def parsed_tree; end",
"d... | [
"0.6953766",
"0.5924444",
"0.59131575",
"0.57801956",
"0.57300323",
"0.57300323",
"0.57300323",
"0.57300323",
"0.5648972",
"0.55675656",
"0.5515002",
"0.5462732",
"0.544579",
"0.5424358",
"0.5415949",
"0.5378764",
"0.53602344",
"0.5280151",
"0.5261095",
"0.5261095",
"0.524698... | 0.5970105 | 1 |
Returns the value of attribute span_start | def span_start; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def span_start=(_); end",
"def start\n attributes.fetch(:start)\n end",
"def start\n attributes.fetch(:start)\n end",
"def start_line\n attributes.fetch(:startLine)\n end",
"def start_at\n @attributes[:start_at]\n end",
"def start_at\n @attribu... | [
"0.7608791",
"0.6850186",
"0.6850186",
"0.6719091",
"0.6695656",
"0.6695656",
"0.6628144",
"0.64621466",
"0.64195704",
"0.6368673",
"0.6356371",
"0.6291845",
"0.6284015",
"0.61910045",
"0.6151546",
"0.610612",
"0.6102662",
"0.60727537",
"0.6055549",
"0.6053177",
"0.6047589",
... | 0.79146886 | 0 |
Sets the attribute span_start | def span_start=(_); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def span_start; end",
"def start=(value)\n\t\t\t@start = value\n\t\tend",
"def start_span(span)\n @@spans.push(span)\n end",
"def set_start(v)\n add_state(v)\n @start = v\n end",
"def set_start(v)\n add_state(v)\n @start = v\n end",
"def start=(new_start)\n ... | [
"0.75436705",
"0.73064256",
"0.7240331",
"0.7015821",
"0.7015821",
"0.6974275",
"0.6730801",
"0.66746724",
"0.6584949",
"0.6418995",
"0.62673336",
"0.6223211",
"0.6223211",
"0.6223211",
"0.6223211",
"0.6223211",
"0.6223211",
"0.6223211",
"0.6223211",
"0.6215794",
"0.62121534"... | 0.77963257 | 0 |
Returns the value of attribute start_re | def start_re; end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def start_re=(_); end",
"def start_character\n attributes.fetch(:startCharacter)\n end",
"def start\n attributes.fetch(:start)\n end",
"def start\n attributes.fetch(:start)\n end",
"def start_line\n attributes.fetch(:startLine)\n end",
"def ... | [
"0.6904577",
"0.6224015",
"0.6127753",
"0.6127753",
"0.6084723",
"0.59657526",
"0.5943003",
"0.5896594",
"0.5877957",
"0.578011",
"0.5735598",
"0.57290757",
"0.5690391",
"0.5640267",
"0.5640267",
"0.5632456",
"0.56283486",
"0.5626775",
"0.5612154",
"0.5578436",
"0.55701554",
... | 0.73867327 | 0 |
Sets the attribute start_re | def start_re=(_); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def start_re; end",
"def start=(value)\n\t\t\t@start = value\n\t\tend",
"def start=(new_start)\n @start = new_start ? new_start.to_i : nil\n end",
"def start_word_pattern; end",
"def on_regexp_beg(token)\n log \"REGEXP_BEG: '#{token}'\"\n super(token)\n end",
"def start_of_li... | [
"0.74252975",
"0.64898497",
"0.6404881",
"0.59020627",
"0.585864",
"0.583596",
"0.58039045",
"0.57382673",
"0.5641237",
"0.5641237",
"0.5580056",
"0.55464435",
"0.5535149",
"0.5522098",
"0.55101955",
"0.54762363",
"0.54668266",
"0.5435971",
"0.54343927",
"0.54340315",
"0.5420... | 0.72730273 | 1 |
Treat +name+ as if it were camelized (e.g. CamelizedName) and snakecase it (e.g. camelized_name). source://kramdown//lib/kramdown/utils.rb31 | def snake_case(name); end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def snakecase(name)\n name.gsub(/([A-Z]+)([A-Z][a-z])/,'\\1_\\2').gsub(/([a-z\\d])([A-Z])/,'\\1_\\2').downcase\n end",
"def camelize!\n self.titleize!\n self.replace(self[0, 1].downcase + self[1..-1])\n end",
"def camelize(name, uc_first=true)\n parts = name.to_s.split('_')\n assemble = la... | [
"0.7805677",
"0.75532055",
"0.7520111",
"0.7499121",
"0.7471629",
"0.7395687",
"0.73616064",
"0.7349704",
"0.7305488",
"0.723262",
"0.7230431",
"0.7230142",
"0.7203846",
"0.71973544",
"0.7077739",
"0.70476395",
"0.7025442",
"0.700546",
"0.6962212",
"0.6942761",
"0.6942761",
... | 0.8241371 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.