markup

Convert Textile Markup to Markdown?

浪子不回头ぞ 提交于 2019-12-02 23:24:42
I'm merging legacy Systems and some components use Markdown and others use Textile formatting. This is extremely confusing to my users. Therefore I want to standardize on Markdown. Is there a way to convert at least the Bulk of Textile formatting to markdown automatically? Jonas Because Markdown and Textile are both meant to produce HTML, consider converting all Texile to HTML first. There are a number of Markdown implementations which also support converting HTML back to Markdown. Pandoc being one example. Another possible solution would be using XSLT . Because Textile is more verbose than

How to create a nested list in reStructuredText?

六月ゝ 毕业季﹏ 提交于 2019-12-02 21:32:30
I am trying to create a properly nested list using the following code (following Sphinx and docutils docs): 1. X a. U b. V c. W 2. Y 3. Z I expect this to result in two OL s but I get the following output instead: <ol class="arabic simple"> <li>X</li> </ol> <blockquote> <div> <ol class="loweralpha simple"> <li>U</li> <li>V</li> <li>W</li> </ol> </div> </blockquote> <ol class="arabic simple" start="2"> <li>Y</li> <li>Z</li> </ol> What am I doing wrong? Is it not possible to get the following result? <ol class="arabic simple"> <li>X <ol class="loweralpha simple"> <li>U</li> <li>V</li> <li>W</li>

Compare and contrast the lightweight markup languages [closed]

情到浓时终转凉″ 提交于 2019-12-02 13:49:35
Please identify the most popular lightweight markup languages and compare their strengths and weaknesses. These languages should be general-purpose markup for technical prose, such as for documentation (for example, Haml doesn't count). See also: Markdown versus ReStructuredText JasonSmith I know of three main languages used commonly in the greater programming and tech community: Textile, Markdown, and reStructuredText. All three can be learned in a couple of hours or "winged" with the cheat sheet nearby. Textile Used by Redmine and the Ruby community 113 questions currently tagged on Stack

Regular expression to replace “escaped” characters with their originals

北战南征 提交于 2019-12-02 08:52:21
问题 NOTE: I'm not parsing lots of or html or generic html with regex. I know that's bad TL;DR : I have strings like A sentence with an exclamation\! Next is a \* character Where there are "escaped" characters in the original markup. I wish to replace them with their "originals". And get: A sentence with an exclamation! Next is a * character I have a small bit data that I need to extract from some wiki markup. I'm only dealing with paragraphs/snippets here, so I don't need a big robust solution.

Wanted: Rikulo UXL example(s)

徘徊边缘 提交于 2019-12-02 07:27:12
问题 I want to get some UXL working with the Dart Editor. I'm afraid that I feel the sample code on UXL Overview is either out of date or lacks some critical steps to let it perform. (See also: What is Rikulo dart really?, which directs people to the blogs). I want to get up to speed with something like the UXL mark-up for the Dart environment. So are the only examples I've found are on the blog/documentation and the seem to be incomplete. https://github.com/rikulo/uxl And it seems like it may not

Stagger or Stair-Case a Menu

可紊 提交于 2019-12-02 03:52:41
I have a menu, created from the usual unordered list, that I want to style horizontally with CSS so that each menu entry is slightly lower than the prior entry. The result would be a stair-case effect: Home News About Contact My example above shows a full-line displacement for each menu entry, but what I actually want is pixel-level control of the stair-casing, so that each menu entry is potentially just a half or quarter character height displaced from the prior menu entry. How do I make this trick work with CSS, preferably without uing CSS3? More precisely, isn't there a way to specify "this

Schema.org: What to use, Microdata or JSON-LD?

柔情痞子 提交于 2019-12-02 01:45:35
The data markup Schema.org for search sites like Google, Yahoo!, Bing and Yandex is great for snippets. However, I perceive that most of webmasters use Microdata and almost never use JSON-LD . I learned about JSON-LD recently and I have some doubts: Could I use it without compability problems with search engine? unor There can’t be a general answer: Each consumer (search engine, tool, etc.) has its own conditions (what it supports for which feature). Each syntax (JSON-LD, Microdata, RDFa, etc.) has its own advantages and disadvantages. Specific example to illustrate the problem: Google

iOS9系列专题二——全新的搜索功能api

半城伤御伤魂 提交于 2019-12-02 00:44:11
更加智能的搜索方案——iOS9搜索功能新api 一、引言 iOS9中为我们提供了许多新的api,搜索功能的加强无疑是其中比较显眼的一个。首先,我们先设想一下:如果在你的app中定义一种标识符,在siri和搜索中,可以用过这个标识符搜索到你的app,是不是很棒?不,这还差得远,你可以定义任意的数据,使其在搜索和siri中可以快速检索到,这样的搜索功能是不是非常酷?不,还有更cool的,你甚至可以在你的网站中添加一些标志,使apple的爬虫可以检索到,那样,即使用户没有安装你的app,也可以在搜索中获取到相应的信息,这太强大了,对吧。 二、3种全新的搜索模式 ‍1、NSUserActivity‍ 我们可以在项目中使用相应的函数来添加一些用户的活跃元素,使我们可以在搜索中通过搜索这样的活跃元素展现我们的app。例如: //创建一个对象,这里的type用于区分搜索的类型 NSUserActivity *userActivity = [[NSUserActivity alloc] initWithActivityType: @"myapp"]; //显示的标题 userActivity.title = @"我的app"; // 搜索的关键字 userActivity.keywords = [NSSet setWithArray: @[@"sea",@"rch"]]; // 支持Search

How to get pretty HTML source code from PHP generated output?

半世苍凉 提交于 2019-12-01 22:59:31
When you look at the source code of PHP generated output usually everything is on one line, it makes it very hard for front end developers to read the code and trouble shoot. So is there a way to get PHP generated output to go from this: <ul><li>Hello</li><li>Hola</li><li>Bonjour</li></ul> to <ul> <li>Hello</li> <li>Hola</li> <li>Bonjour</li> </ul> WITHOUT using /n line breaks all over the server side code which just makes that messy. For more or less clean looking PHP generated code I used " signs for the echo output Strings, wich enables you to use \n and \t or other codes like that to make

Is it wrong in XML to have element nodes as siblings of text nodes?

痞子三分冷 提交于 2019-12-01 22:32:35
问题 Is the following "allowed" or simply bad use of XML? I cannot find restrictions on this, but it feels a bit weird. <example> You can choose from <option>this</option> <option>that</option> <option>something else</option> Choose wisely. </example> If it is wrong, what is a nice alternative? 回答1: No, mixing elements and text is completely normal in XML. You may be more familiar with data-oriented uses of XML, but XML actually evolved from a basis in representing documents, where marking up text