Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/dok.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inline.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/inline.lua b/inline.lua
index 48eccc3..162f868 100644
--- a/inline.lua
+++ b/inline.lua
@@ -248,7 +248,8 @@ function dok.html2funcs(html, package)
local canchor
local lines = {}
for line in html:gmatch('[^\n\r]+') do
- local anchor = line:match('<a.-name="(.-)"/>')
+ local anchor = line:match('<a.-name=["\'](.-)["\']/>')
+ or line:match('<a.-name=["\'](.-)["\']>.-</a>')
local level, name = line:match('<h(%d)>(.*)</h%d>')
if anchor then
canchor = anchor