qwik2md 0.1.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/qwik2md/version.rb +1 -1
- data/lib/qwik2md.rb +15 -0
- data/vendor/qwik/lib/qwik/act-archive.rb +1 -1
- data/vendor/qwik/lib/qwik/act-backup.rb +1 -1
- data/vendor/qwik/lib/qwik/act-basic.rb +0 -1
- data/vendor/qwik/lib/qwik/act-christel.rb +0 -1
- data/vendor/qwik/lib/qwik/act-code.rb +1 -1
- data/vendor/qwik/lib/qwik/act-comment.rb +1 -1
- data/vendor/qwik/lib/qwik/act-edit.rb +1 -1
- data/vendor/qwik/lib/qwik/act-files.rb +0 -1
- data/vendor/qwik/lib/qwik/act-getpass.rb +1 -1
- data/vendor/qwik/lib/qwik/act-keywords.rb +3 -3
- data/vendor/qwik/lib/qwik/act-login.rb +0 -1
- data/vendor/qwik/lib/qwik/act-mdlb.rb +1 -1
- data/vendor/qwik/lib/qwik/act-member.rb +1 -1
- data/vendor/qwik/lib/qwik/act-new.rb +1 -1
- data/vendor/qwik/lib/qwik/act-plan.rb +1 -1
- data/vendor/qwik/lib/qwik/act-povray.rb +1 -1
- data/vendor/qwik/lib/qwik/act-presen.rb +1 -1
- data/vendor/qwik/lib/qwik/act-ring.rb +2 -4
- data/vendor/qwik/lib/qwik/act-sitebackup.rb +1 -1
- data/vendor/qwik/lib/qwik/act-textarea.rb +1 -1
- data/vendor/qwik/lib/qwik/act-wema.rb +1 -1
- data/vendor/qwik/lib/qwik/act-wysiwyg.rb +1 -1
- data/vendor/qwik/lib/qwik/bench-format-xml.rb +1 -1
- data/vendor/qwik/lib/qwik/catalog-ja.rb +1 -1
- data/vendor/qwik/lib/qwik/catalog-ml-ja.rb +1 -1
- data/vendor/qwik/lib/qwik/description.rb +0 -1
- data/vendor/qwik/lib/qwik/farm.rb +1 -1
- data/vendor/qwik/lib/qwik/mail-body.rb +0 -1
- data/vendor/qwik/lib/qwik/mail-header.rb +4 -5
- data/vendor/qwik/lib/qwik/ml-processor.rb +1 -1
- data/vendor/qwik/lib/qwik/page-get.rb +1 -1
- data/vendor/qwik/lib/qwik/test-ms-japanese.rb +1 -1
- data/vendor/qwik/lib/qwik/test-ms-plan.rb +1 -1
- data/vendor/qwik/lib/qwik/test-submit-japanese.rb +1 -1
- data/vendor/qwik/lib/qwik/util-time.rb +0 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3106526347f3ea2c05225be6df24e05292b86169
|
4
|
+
data.tar.gz: 4575f2c43c033351f79d3ac1f07e7cc0df7e3e6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96e6b6f0987accd4dbf92be60fc2375b101ad92e850958a7636d5e99e7fe40b317da34db066f4bccbee7b1288ae5b9974c7c78e6a751d2e4effb0ce16566c442
|
7
|
+
data.tar.gz: ea52c9a2cad57459dcd208f6969ae1d7cfb88d608303db7fd964c2a22d1e9b1954cb22e453a425b0cf9067cdaf38da0145abf798fa8bba4a795377f94d2f72f2
|
data/lib/qwik2md/version.rb
CHANGED
data/lib/qwik2md.rb
CHANGED
@@ -4,6 +4,12 @@ require "qwik/tokenizer"
|
|
4
4
|
require "qwik/parser"
|
5
5
|
require 'qwik/wabisabi-format-xml'
|
6
6
|
require 'reverse_markdown'
|
7
|
+
require 'qwik/action'
|
8
|
+
require 'qwik/loadlib'
|
9
|
+
|
10
|
+
require 'ostruct'
|
11
|
+
|
12
|
+
Qwik::LoadLibrary.load_libs_here('qwik/act-*')
|
7
13
|
|
8
14
|
module Qwik2md
|
9
15
|
class << self
|
@@ -33,6 +39,15 @@ module Qwik2md
|
|
33
39
|
|
34
40
|
tokens = Qwik::TextTokenizer.tokenize(str)
|
35
41
|
tree = Qwik::TextParser.make_tree(tokens)
|
42
|
+
action = Qwik::Action.new
|
43
|
+
action.init(OpenStruct.new(test: true), nil, nil, nil)
|
44
|
+
action.instance_eval do
|
45
|
+
@site = Object.new
|
46
|
+
def @site.resolve_all_ref(tree)
|
47
|
+
tree
|
48
|
+
end
|
49
|
+
end
|
50
|
+
tree = action.resolve_all_plugin(tree)
|
36
51
|
tree.format_xml
|
37
52
|
end
|
38
53
|
end
|
@@ -307,7 +307,7 @@ if defined?($test) && $test
|
|
307
307
|
ok_xp [:input, {:value=>'98bf7d8c15784f0a3d63204441e1e2aa',
|
308
308
|
:type=>'hidden', :name=>'md5hex'}], '//input'
|
309
309
|
ok_xp [:input, {:value=>'Save', :type=>'submit', :class=>'submit',
|
310
|
-
:
|
310
|
+
:name=>'save'}], '//input[2]'
|
311
311
|
# ok_xp [:a, {:href=>'_SiteMenu.html'}, 'SiteMenu'],
|
312
312
|
# '//div[@class='sidebar']//a'
|
313
313
|
# ok_xp [:a, {:href=>'1.presen'}, 'Presentation mode'],
|
@@ -88,9 +88,9 @@ TextFormatページの一覧が表示されます。
|
|
88
88
|
feature = n.getFeature.set_euc.to_sjis
|
89
89
|
if ! surface.empty? &&
|
90
90
|
RE_SJIS =~ surface &&
|
91
|
-
/\A([ぁ-んー~]+)\z/
|
92
|
-
/\A[
|
93
|
-
/\A[,←]/
|
91
|
+
/\A([ぁ-んー~]+)\z/ !~ surface &&
|
92
|
+
/\A[.→、。]/ !~ surface &&
|
93
|
+
/\A[,←]/ !~ surface
|
94
94
|
# /\A[ 0-9→「」()、。]/s !~ surface
|
95
95
|
nodes << [surface, feature]
|
96
96
|
end
|
@@ -6,8 +6,6 @@
|
|
6
6
|
|
7
7
|
$LOAD_PATH.unshift '..' unless $LOAD_PATH.include? '..'
|
8
8
|
|
9
|
-
$KCODE = 's'
|
10
|
-
|
11
9
|
module Qwik
|
12
10
|
class Action
|
13
11
|
NotUse_D_ExtRing = {
|
@@ -156,7 +154,7 @@ module Qwik
|
|
156
154
|
return ring_invite_goback(href)
|
157
155
|
end
|
158
156
|
|
159
|
-
if guest_mails.to_s == 'guest@example.com'
|
157
|
+
if guest_mails.to_s == 'guest@example.com'
|
160
158
|
return ring_invite_goback(href)
|
161
159
|
end
|
162
160
|
|
@@ -618,7 +616,7 @@ http://ring.sfc.keio.ac.jp/.getpass?mail=#{guest_mail}
|
|
618
616
|
if userpage.nil?
|
619
617
|
return span << user
|
620
618
|
end
|
621
|
-
|
619
|
+
|
622
620
|
return span << [:a, {:href=>"#{userpage}.html"}, user]
|
623
621
|
end
|
624
622
|
|
@@ -1,11 +1,10 @@
|
|
1
|
-
# -*- coding: shift_jis -*-
|
2
1
|
#
|
3
|
-
# Copyright (C) 2002-2004 Satoru Takabayashi <satoru@namazu.org>
|
2
|
+
# Copyright (C) 2002-2004 Satoru Takabayashi <satoru@namazu.org>
|
4
3
|
# Copyright (C) 2003-2006 Kouichirou Eto
|
5
4
|
# All rights reserved.
|
6
5
|
# This is free software with ABSOLUTELY NO WARRANTY.
|
7
6
|
#
|
8
|
-
# You can redistribute it and/or modify it under the terms of
|
7
|
+
# You can redistribute it and/or modify it under the terms of
|
9
8
|
# the GNU General Public License version 2.
|
10
9
|
#
|
11
10
|
|
@@ -101,7 +100,7 @@ module QuickML
|
|
101
100
|
|
102
101
|
# ==================== Class methods.
|
103
102
|
def self.collect_address (field)
|
104
|
-
address_regex =
|
103
|
+
address_regex =
|
105
104
|
/(("?)[-0-9a-zA-Z_.+?\/]+\2@[-0-9a-zA-Z]+\.[-0-9a-zA-Z.]+)/ #/
|
106
105
|
addresses = []
|
107
106
|
parts = Mail.remove_comment_in_field(field).split(',')
|
@@ -355,7 +354,7 @@ if defined?($test) && $test
|
|
355
354
|
# test_add_recipient
|
356
355
|
mail.add_recipient('b@e.com')
|
357
356
|
ok_eq(false, mail.valid?)
|
358
|
-
|
357
|
+
|
359
358
|
# test_clear_recipients
|
360
359
|
mail.clear_recipients
|
361
360
|
|