Help: Where is the portion of code that finds inline tags?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Help: Where is the portion of code that finds inline tags?

tmose1106
Hey guys, I'm a pretty avid user of Asciidoctor. I am actually trying to create a small project written in python 3 to accomplish a similar task. But I am having a bit of an issue with inline syntax. By inline syntax, I am referring towards things like bolding or italicizing a group of words in a line. So let's say I have a line like "Hey, look at this _*bold italic text*_", where is this resolved in the Asciidoctor project? So if I could have a link to the function(s) that do this, that would be great. Otherwise an explaination of how it works would be appreciated.

Thanks for your time!
Reply | Threaded
Open this post in threaded view
|

Re: Help: Where is the portion of code that finds inline tags?

mojavelinux
Administrator
You are probably looking for substitutors.rb.

https://github.com/asciidoctor/asciidoctor/blob/master/lib/asciidoctor/substitutors.rb

Specifically, sub_quotes method. In AsciiDoc, "quotes" is the improperly named keyword for "formatted text". (We have plans to change it in the future).

Note that at the moment, all inline substitutions are performed using "search and replace". It's on the roadmap to switch to a formal inline parser. See https://github.com/asciidoctor/asciidoctor/issues/61

Cheers,

-Dan

On Fri, Sep 9, 2016 at 8:15 AM, tmose1106 [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hey guys, I'm a pretty avid user of Asciidoctor. I am actually trying to create a small project written in python 3 to accomplish a similar task. But I am having a bit of an issue with inline syntax. By inline syntax, I am referring towards things like bolding or italicizing a group of words in a line. So let's say I have a line like "Hey, look at this _*bold italic text*_", where is this resolved in the Asciidoctor project? So if I could have a link to the function(s) that do this, that would be great. Otherwise an explaination of how it works would be appreciated.

Thanks for your time!


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Help-Where-is-the-portion-of-code-that-finds-inline-tags-tp4948.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux