Verified Commit 3a856c74 authored by Aral Balkan's avatar Aral Balkan
Browse files

Remove unused function and also fix some whitespace issues

parent b4347d3d
......@@ -239,7 +239,7 @@ class Blockdown
# Private methods.
#
# Returns the partial HTML after a Set render.
# Returns the partial HTML after a Set render.
partial: (fullHTML) -> (fullHTML.replace '<html><head></head><body>', '').replace('</body></html>', '')
#
......@@ -250,7 +250,7 @@ class Blockdown
# Write out the opening section tags
html = html.replace(/<h2 id="(.*?)">(.*?)<\/h2>/g, "<section id=\"$1\">\n\t<h2>$2</h2>")
# Write out the closing section tags
# Write out the closing section tags
html = html.replace(/(<section.*?>)/g, "\n</section>\n$1")
# Remove the erroneous first </section> tag
......@@ -462,7 +462,7 @@ class Blockdown
category = if categoryIndex then fileComponents[categoryIndex] else 'none'
pageDomain = if categoryIndex then fileComponents[categoryIndex+1] else 'none'
# Add more specific ‘site’ or ‘tracker’ to category class list if necessary
# Add more specific ‘site’ or ‘tracker’ to category class list if necessary
categoryForTemplate = if categoryIndex and categoryIndex == (fileComponents.length - 3) then "#{category} #{category.substr(0, category.length-1)}" else category
#
......@@ -523,7 +523,6 @@ Better is a Safari content blocker for <a href='https://itunes.apple.com/us/app/
# console.log indexCacheObject
fs.outputJSONSync indexCacheFile, indexCacheObject
# Strip the markdown from the title for the site (keep it for the app
# as we use it to intelligently truncate the title displayed in the navitation bar).
# Only valid markup for headings is strong and emphasized, so just strips the *s.
......@@ -661,7 +660,6 @@ Better is a Safari content blocker for <a href='https://itunes.apple.com/us/app/
navigationList = @navigationList name
headerPartialHTML = @partial(set.render(@theme.header, {navigationList: navigationList}))
title = name[0].toUpperCase() + name.slice(1) # title is the name with the first letter capitalised.
title += ' | Better'
......@@ -677,7 +675,7 @@ Better is a Safari content blocker for <a href='https://itunes.apple.com/us/app/
#
# Navigation list for local links
#
# (The forum and source links are not here as they’re external and cannot be
# (The forum and source links are not here as they’re external and cannot be
# highlighted dynamically in the navigation when navigated to.)
navigationList =
[
......@@ -853,31 +851,6 @@ Better is a Safari content blocker for <a href='https://itunes.apple.com/us/app/
fs.outputFileSync partialRuleFile, rulesJSON, 'utf-8'
#
# Create the index HTML files for the site.
# UNUSED. TODO: Refactor or remove.
#
createIndexFilesForSiteData: (indices) =>
directoryPaths = Object.keys indices
Promise.series directoryPaths, (directoryPath) =>
fileNames = indices[directoryPath]
indexHTMLFilePath = path.join app.dataForSiteDirectory, directoryPath, 'index.html'
indexHTML = "<ul>\n"
for fileName in fileNames
indexHTML += "\t<li><a href='#{fileName}'>#{fileName}</a>\n"
indexHTML += "</ul>"
indexHTML = app.siteTheme.header + indexHTML + app.siteTheme.footer
fs.outputFileAsync indexHTMLFilePath, indexHTML
#
# Hook into the marked Markdown renderer for the Blockdown MSON code sections.
#
......@@ -1488,7 +1461,6 @@ Better is a Safari content blocker for <a href='https://itunes.apple.com/us/app/
actionSelector = action['selector']
expect(actionSelector, 'action.selector').to.be.a 'string'
#
# There are 3 types of actions that limit resources:
#
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment