Comments (7)
I don't mind the extra dependency if it enables a good solution. What I am worried about is the escaping you are talking about, can you elaborate on why and when it happens?
from wiki.
The extra dependency is simple and pure-python, so its friendly to a broad spectrum of environments. I agree that the key concerns are about behavior.
from wiki.
Here's my Usability concerns:
-
Included WikiLinks support:
If I had a paragraph that I wanted to render as follows:
In this scenario the fatigue stress is lower than the yield stress due to material properties.
I could do this:
In this scenario the [[fatigue stress]] is lower than the [[yield stress]] due to material properties.
But that would yield:
In this scenario the fatigue stress is lower than the yield stress due to material properties.
The links are not the same. So I would have to reword it:
In this scenario the [[strength/fatigue]] is lower than the [[strength/yield]] due to material properties.
Yielding:
In this scenario the strength/fatigue is lower than the strength/fatigue due to material properties.
That is ugly and sort of removes some context to the statement. There's no real easy way to fix this with the default extension.
-
With the semantic wikilinks extension, it is a bit easier:
I can get exactly what I want by typing my WikiLinks like this:
In this scenario the [[/strength/fatigue|fatigue stress]] is lower than the [[/strength/yield|yield stress]] due to material properties.
This outputs exactly what I need (it also pays attention to absolute and relative paths). But what if I just want to use the defaults
[[]]
behavior? Say I'm on the page:/tolerance_example/
If you like this, then the [[Tolerance Toolbox]] can elaborate on everything explained here.
This would yield:
If you like this, then the [Tolerance Toolbox](/tolerance_example/Tolerance Toolbox) can elaborate on everything explained here.
As you can see the link is wrong, implying that it's a sub-page of
tolerance_example
as well as maintaining capitalization and spaces. So we use it's config feature to correct for all this:def wikilink_builder(self, md, rel, target, label): link = target.lower().replace(' ', '_') output = '<a rel="{0}" href="/{1}">{2}</a>'.format(rel, link, label or target) return output
This breaks everything out and assumes it's at the root (meaning to go to subpages you'll need to use the
[[first/second|Title]]
syntax). I thought this would work well, but the output is actually:If you like this, then the <a rel="None" href="/tolerance_toolbox">Tolerance Toolbox</a> can elaborate on everything explained here.
So as you can see, I haven't quite figured out the best option. I think the Semantic Wikilinks is the best way to go. But it may require me to dig into that code to submit a bug report, not completely sure at this point.
from wiki.
as far as I understood from a quick check from the readme, it appears that it is not a string that is expected as a return element but much rather some type of etree.Element instance? Might this be the issue here?
from wiki.
Yeah, I looked into it early on. What I got was an error:
TypeError: must be Element, not Element
Since that is so informative, I tried making it a string. I figured it would simply pass the string, but it wasn't. So I'll go back and try to figure out which Element it wants.
from wiki.
I've added autolinking support In restructuredtext with a very simple trick: just try to render the document: every missing link is reported as an error so retry but adding (manipulating the content input) the missing links targets as "internal wiki links" (using the same urlifing function we use when create a new page).
See mgaitan@3341a8f92dc3da78 for details
from wiki.
Closed. Ref: #36
from wiki.
Related Issues (20)
- Auth behind Apache
- Disable auth-required buttons for anon HOT 1
- Built-in wsgi()
- Feature: protected pages
- Feature: REGISTERING:bool option
- Tests Failing HOT 2
- Update responsiveness rules
- 500 error when save the first post,please help HOT 2
- Flask-Login raises TypeError: 'bool' object is not callable
- wikilink raises werkzeug.routing.BuildError
- help docs
- Can't add page: HOT 3
- setup.py should exclude the tests package HOT 1
- Too old 'click' required HOT 1
- Extra requirement: Pygments HOT 1
- Strange page routing HOT 1
- Skip files without meta-data HOT 1
- Non-ascii files behind Apache HOT 2
- WSGI: inner link points outside application
- HowTo run in sources dir HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wiki.