wiki-server 0.20.0 → 0.21.0-rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AUTHORS.txt +1 -0
- package/lib/search.coffee +5 -5
- package/lib/sitemap.coffee +3 -0
- package/package.json +1 -1
- package/wiki-server-0.21.0-rc1.tgz +0 -0
package/AUTHORS.txt
CHANGED
package/lib/search.coffee
CHANGED
|
@@ -165,18 +165,18 @@ module.exports = exports = (argv) ->
|
|
|
165
165
|
try
|
|
166
166
|
switch currentItem.type
|
|
167
167
|
when 'paragraph'
|
|
168
|
-
pageText += ' ' + currentItem.text.replace /\[{
|
|
168
|
+
pageText += ' ' + currentItem.text.replace /\[{2}|\[(?:[\S]+)|\]{1,2}/g, ''
|
|
169
169
|
when 'markdown'
|
|
170
|
-
# really need to extract text from the markdown, but for now just remove link brackets...
|
|
171
|
-
pageText += ' ' + currentItem.text.replace /\[{
|
|
170
|
+
# really need to extract text from the markdown, but for now just remove link brackets, urls...
|
|
171
|
+
pageText += ' ' + currentItem.text.replace /\[{2}|\[(?:[\S]+)|\]{1,2}/g, ''
|
|
172
172
|
when 'html'
|
|
173
173
|
pageText += ' ' + currentItem.text.replace /<[^>]*>/g, ''
|
|
174
174
|
else
|
|
175
175
|
if currentItem.text?
|
|
176
176
|
for line in currentItem.text.split /\r\n?|\n/
|
|
177
|
-
pageText += ' ' + line.replace /\[{
|
|
177
|
+
pageText += ' ' + line.replace /\[{2}|\[(?:[\S]+)|\]{1,2}/g, '' unless line.match /^[A-Z]+[ ].*/
|
|
178
178
|
catch err
|
|
179
|
-
|
|
179
|
+
throw new Error("Error extracting text from #{currentIndex}")
|
|
180
180
|
pageText
|
|
181
181
|
|
|
182
182
|
|
package/lib/sitemap.coffee
CHANGED
|
@@ -58,6 +58,9 @@ module.exports = exports = (argv) ->
|
|
|
58
58
|
while (match = linkRe.exec(currentItem.text)) != null
|
|
59
59
|
if not collaborativeLinks.has(asSlug(match[1]))
|
|
60
60
|
collaborativeLinks.set(asSlug(match[1]), currentItem.id)
|
|
61
|
+
if 'reference' == currentItem.type
|
|
62
|
+
if not collaborativeLinks.has(currentItem.slug)
|
|
63
|
+
collaborativeLinks.set(currentItem.slug, currentItem.id)
|
|
61
64
|
catch err
|
|
62
65
|
console.log "METADATA *** #{wikiName} Error extracting links from #{currentIndex} of #{JSON.stringify(array)}", err.message
|
|
63
66
|
collaborativeLinks
|
package/package.json
CHANGED
|
Binary file
|